Select, SearchableDropdown
FrondPython SDK
Usage
The import, then a use to start from. Both copy as they are.
Import
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";Example
<Select value={language} onValueChange={setLanguage}> <SelectTrigger className="w-44" aria-label="SDK language"> <SelectValue placeholder="Pick a language" /> </SelectTrigger> <SelectContent> <SelectItem value="python">Python SDK</SelectItem> <SelectItem value="typescript">TypeScript SDK</SelectItem> <SelectItem value="go">Go SDK</SelectItem> </SelectContent></Select>When to use
Use it for
Selectfor one choice from a short list you know up front.SearchableDropdownpast about 8 options, or when the list loads from the server: it searches, groups withgetItemGroup, and has loading and empty states.- The trigger shows the current value; the placeholder says what to pick.
Avoid
- 2 to 5 options that should all stay in view: use a
RadioGroupor aSegmentedControl. - A list of actions. That's a
DropdownMenu.
Accessibility
Checks
- Both work from the keyboard: the arrow keys move, Enter picks, Escape closes.
- The trigger has a name: a visible
Label, or anaria-labelin a toolbar.
API
Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.
Select
Its stories don't declare
argTypes, so no props are listed. The variants show its states.Also exportsSelectContentSelectGroupSelectItemSelectLabelSelectScrollDownButtonSelectScrollUpButtonSelectSeparatorSelectTriggerSelectValue
VariantsDefaultWithGroupsWithDescriptionsSmallWithDisabledItems
SearchableDropdown
Its stories don't declare
argTypes, so no props are listed. The variants show its states.VariantsDefaultWithSectionsWithHeaderContentAlignEndEmpty
Keep going
- Switch, Checkbox, RadioGroupBoolean and choice controls. Switch applies immediately; Checkbox waits for Save.Frond
- Dialog, Popover, DropdownMenuFloating surfaces on
bg-overlaywith one hairline andshadow-overlay.Fiddle - SegmentedControl2–5 exclusive views. Tabs for page sections, SegmentedControl for a view toggle.Fiddle