Select

A dropdown select built on React Aria - the trigger matches the Figma surface 1:1, the popover is non-modal so the page keeps scrolling, and items accept free-form content like status dots and avatars.

Installation

You can add this select component using our CLI or manually:

Dark mode ready - this component follows BoardUI semantic tokens automatically. Set up theme switching.

The CLI copies the component source (with its internal dependencies) into your project and installs any required npm packages.

npx boardui@latest add select

Using a shared UI package or custom import aliases? Configure your installation paths before running the CLI. Copy-paste examples use the default imports.

Compact and comfortable

The menu is BoardUI's compact dropdown by default: a 14px panel at 4px padding over tight rows, as wide as the trigger. A long list scrolls under a soft top blur and opens on the selected row. Pass variant="comfortable" for the roomier 266px menu.

Compact
Comfortable
const years = Array.from({ length: 41 }, (_, index) => 2000 + index); {/* Compact is the default menu: no prop needed */}<Select label="Compact" defaultSelectedKey="2026" className="w-[120px]"> {years.map((year) => ( <SelectItem key={year} id={String(year)}>{year}</SelectItem> ))}</Select> {/* The roomier 266px menu */}<Select label="Comfortable" variant="comfortable" defaultSelectedKey="2026" className="w-[120px]"> {years.map((year) => ( <SelectItem key={year} id={String(year)}>{year}</SelectItem> ))}</Select>

Label and placeholder

Pass label for a visible field label: React Aria renders it as the select's label and names the trigger with it, so screen readers announce both. placeholder shows until something is picked. Selects without a visible label, like the filters above, take aria-label instead.

Role
{/* label names the select; placeholder shows until something is picked */}<Select label="Role" placeholder="Select a role" className="w-[240px]"> <SelectItem id="admin" textValue="Admin">Admin</SelectItem> <SelectItem id="editor" textValue="Editor">Editor</SelectItem> <SelectItem id="viewer" textValue="Viewer">Viewer</SelectItem></Select>

With status dot

Items render arbitrary children next to the label - always pass textValue so typeahead and the trigger label stay correct.

import { StatusDot } from "@/components/base/badges/status-dot"; {/* Items take free-form content - dots, avatars, icons */}<Select aria-label="Purchase status" defaultSelectedKey="completed" className="w-[142px]"> <SelectItem id="completed" textValue="Completed"> <StatusDot color="green" /> Completed </SelectItem> <SelectItem id="waiting" textValue="Waiting"> <StatusDot color="yellow" /> Waiting </SelectItem> <SelectItem id="processing" textValue="Processing"> <StatusDot color="indigo" /> Processing </SelectItem></Select>