Dropdown
A composable popover menu built on React Aria — where Select picks a value into its trigger, Dropdown is a free-form panel of grouped action rows with the BoardUI surface (radius 16, dropdown shadow) and the 150ms scale + blur appear animation. The same recipe behind the dashboard sidebar's team and account menus and the AI chat composer's add menu.
Installation
You can add this dropdown component using our CLI or manually:
The CLI copies the component source (with its internal dependencies) into your project and installs any required npm packages.
npx boardui@latest add dropdownModel picker
The AI chat composer's model menu: rows act as a radio group — selectedkeeps the current row highlighted and a radio glyph sits at the row's end via justify-between.
{/* Radio-group rows: selected state on the row + a radio glyph at the end */}const [model, setModel] = useState("Fable 5");
<Dropdown isOpen={isOpen} onOpenChange={setIsOpen}> <DropdownTrigger className="…pill trigger with the current model + chevron…"> {model} <ChevronDownSmall className={cx("size-4", isOpen && "rotate-180")} /> </DropdownTrigger>
<DropdownPopover aria-label="Models" placement="bottom start"> <DropdownGroup label="Models"> <div role="radiogroup" aria-label="Model" className="flex w-full flex-col gap-1"> {MODELS.map((name) => ( <DropdownItem key={name} selected={name === model} onSelect={() => { setModel(name); setIsOpen(false); }} className="justify-between gap-2.5" > <span className="truncate text-body-medium text-text-primary">{name}</span> <RadioDot selected={name === model} /> </DropdownItem> ))} </div> </DropdownGroup> </DropdownPopover></Dropdown>