Skip to main content

Installation

Usage

Component API

Select

Root select component. Built on Radix UI Select.
Props:
  • defaultValue - Default selected value
  • value - Controlled value
  • onValueChange - Callback when value changes
  • disabled - Disables the select
  • items - Array of items (required)

SelectTrigger

Button that triggers the select dropdown.
Props:
  • size - Trigger size ("sm" | "default")
  • aria-invalid - Shows error state styling

SelectValue

Displays the selected value or placeholder.
Props:
  • placeholder - Text shown when no value is selected

SelectContent

Dropdown content container.
Props:
  • position - Positioning mode ("item-aligned" | "popper")
  • align - Horizontal alignment ("start" | "center" | "end")

SelectGroup

Groups related select items.

SelectItem

Individual selectable option.
Props:
  • value - Unique value for this item
  • disabled - Disables this item

SelectLabel

Label for a group of items.

SelectSeparator

Visual separator between items.

Examples

Basic Select

With Groups

Organize items with labels and separators:

Scrollable

Select with many items:

Disabled State

Invalid State

Show validation errors:

Controlled Select

With Icons

Accessibility

  • Full keyboard navigation support
  • Type-ahead to find items
  • Proper ARIA attributes
  • Focus management
  • Screen reader announcements

API Reference

See the Radix UI Select documentation for complete API reference.