Select

A dropdown select built on Radix primitives. Provides a styled trigger, animated content panel, and accessible keyboard navigation.

Basic

<Select>
  <SelectTrigger className="w-[200px]">
    <SelectValue placeholder="Pick a fruit" />
  </SelectTrigger>
  <SelectContent>
    <SelectItem value="apple">Apple</SelectItem>
    <SelectItem value="banana">Banana</SelectItem>
    <SelectItem value="cherry">Cherry</SelectItem>
  </SelectContent>
</Select>

Disabled

<Select disabled>
  <SelectTrigger className="w-[200px]">
    <SelectValue placeholder="Disabled" />
  </SelectTrigger>
  <SelectContent>
    <SelectItem value="a">Option A</SelectItem>
  </SelectContent>
</Select>

API Reference

PropTypeDefaultDescription
valuestringThe controlled value of the select.
onValueChange(value: string) => voidCallback fired when the selected value changes.
defaultValuestringThe default value when uncontrolled.
disabledbooleanfalseWhen true, prevents interaction with the select.
placeholderstringPlaceholder text displayed via SelectValue when no value is selected.