v0.3.0
Note: This documentation is in active development — content may be incomplete

Select

View as Markdown

Overview

Select is a form control that lets users choose an option from a predefined list. It works well for a single selection from a fixed set of known options.

<Select.Root defaultValue="active">
	<Select.Item value="draft">Draft</Select.Item>
	<Select.Item value="active">Active</Select.Item>
	<Select.Item value="archived">Archived</Select.Item>
</Select.Root>

Usage Guidelines

  • Use for a single choice: Use Select when users need to choose one option from a fixed set. For multiple selections or custom values, use a more suitable control.
  • Write clear option labels: Use concise, distinct labels so users can scan and compare choices quickly.
  • Order options predictably: Arrange options in a clear, expected order, such as alphabetical, chronological, or by frequency of use.

API Reference

Select.Root

Controls selected value state and provides context for listbox rendering.

PropTypeDefault
valuestring-
defaultValuestring-
onValueChange(value: string) => void-
itemsArray<{ value: string; label: ReactNode }>-
childrenReactNode-
disabledbooleanfalse

Select.Item

Selectable option row inside the select popup list.

PropTypeDefault
valuestring-
childrenReactNode-
disabledbooleanfalse

Select.Group

Groups related Select.Item elements under a shared label.

PropTypeDefault
childrenReactNode-

Select.GroupLabel

Renders the label for a grouped set of select items.

PropTypeDefault
childrenReactNode-

Select.Separator

Visual divider between item groups in the popup list.

PropTypeDefault
orientation"horizontal" | "vertical""horizontal"

Examples

Basic selection

Use Select for a single choice from a short, known set of options.

<Select.Root defaultValue="active">
	<Select.Item value="draft">Draft</Select.Item>
	<Select.Item value="active">Active</Select.Item>
	<Select.Item value="archived">Archived</Select.Item>
</Select.Root>

Grouped options

Use groups and separators to organize related options into clearer sections.

<Select.Root defaultValue="viewer">
	<Select.Group label="Workspace">
		<Select.Item value="viewer">Viewer</Select.Item>
		<Select.Item value="editor">Editor</Select.Item>
	</Select.Group>
	<Select.Separator />
	<Select.Group label="Administration">
		<Select.Item value="billing-admin">Billing admin</Select.Item>
		<Select.Item value="owner">Owner</Select.Item>
	</Select.Group>
</Select.Root>

Disabled options

Disable options that users cannot choose yet while keeping the full set of available plans or states visible.

<Select.Root defaultValue="professional">
	<Select.Item value="starter">Starter</Select.Item>
	<Select.Item value="professional">Professional</Select.Item>
	<Select.Item value="enterprise" disabled>
		Enterprise
	</Select.Item>
</Select.Root>

Controlled

Use a controlled select when the selected value needs to stay in sync with surrounding application state.

const [value, setValue] = useState("medium");

<Select.Root value={value} onValueChange={(nextValue) => setValue(nextValue)}>
	<Select.Item value="low">Low</Select.Item>
	<Select.Item value="medium">Medium</Select.Item>
	<Select.Item value="high">High</Select.Item>
</Select.Root>

On this page

(Top)OverviewUsage GuidelinesAPI ReferenceSelect.RootSelect.ItemSelect.GroupSelect.GroupLabelSelect.SeparatorExamplesBasic selectionGrouped optionsDisabled optionsControlled
v0.3.0

Overview

AboutGetting started

Components

AvatarBadgeBannerButtonCalloutCheckboxChipCodeCode InputColor InputData TableDialogDividerDisclosureDrawerEditable TextEmbedEmphasisError BoundaryFieldFile InputFlexFormFrameGridImageInlineInputMarqueeMenuPortalRootRadio GroupRich Text EditorSelectSkeletonSlotSortableSpacerSpinnerStackStatus IconStepperSwitchTab SwitchTextText AreaToggleUrlIcon