Skip to main content

Overview

Select country
Default
Indonesia
Focus
Select department
⚠ Please select a department
Select provides a styled dropdown for single-option selection. It supports grouped options, searchable filtering, disabled items, and validation states via a trigger + content popover pattern.

Installation


Usage


Variants

Basic Select

Select country

With Selected Value

Indonesia

Grouped Options

Select role
MANAGEMENT
Administrator
Manager
OPERATIONAL
Editor
Viewer (disabled)

Error State

Select department
Please select a department

Disabled

Select region

States


API Reference

Select (Root)

string
Controlled selected value.
(value: string) => void
Callback fired when the selected value changes.
string
Uncontrolled default selected value.
boolean
default:"false"
Disables the entire select component.

SelectTrigger

string
Label displayed above the trigger.
string
default:"Select..."
Placeholder text shown when nothing is selected.
string
default:"default"
Validation state. Values: default · error · disabled
string
Helper or error message displayed below the trigger.

SelectItem

string
The option value (required).
boolean
default:"false"
Disables this specific option.

Accessibility

  • Select uses role="combobox" on the trigger and role="listbox" on the content
  • Keyboard navigation: Arrow keys move between options, Enter/Space selects, Escape closes
  • Selected option is marked with aria-selected="true"
  • Disabled options use aria-disabled="true" and are skipped by keyboard navigation
  • Label is associated with the trigger via aria-labelledby
  • Error messages are linked via aria-describedby

Do’s & Don’ts

Do

  • Use Select for 5+ options where a Radio Group would be too long
  • Always include a descriptive label above the trigger
  • Use grouped options when the list has multiple logical categories
  • Show an error state with a clear helper text on validation failure

Don't

  • Don’t use Select for fewer than 3–4 options — use Radio Group instead
  • Don’t use placeholder as a substitute for a label
  • Don’t disable the entire Select without explaining why
  • Don’t put more than 20 options in a flat list — use grouping or search