Skip to content

Select

Form

Dropdown select menu built on Radix UI Select primitive.

ControlledDisabled itemDisabled control
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Compose the trigger, value, content, and items. Use SelectGroup and SelectLabel to organize related options. Use a combobox for searchable lists.

Import
import {
  Select,
  SelectTrigger,
  SelectValue,
  SelectContent,
  SelectItem,
  SelectGroup,
  SelectLabel,
} from "@dashboardpack/core/components/ui/select";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Select props
PropType / DefaultDescription
value / defaultValuestring

Default: —

Selected item value.
onValueChange(value: string) => void

Default: —

Handle a selected option.
disabledboolean

Default: false

Disable the entire select.
placeholder (SelectValue)string

Default: —

Text shown before selection.

Build with these too