Oddmash UI
All components

Select

Choose from a compact list of options.

Usage

Use Select for a styled single choice. Use the HTML select element for native validation, optgroups, or multiple selection.

Accessibility

Provide a visible label. Use arrow keys to move, type to search by label, Enter to select, and Escape to dismiss.

PropertyTypeDefault
optionsreadonly SelectOption[]Required
value / defaultValuestringNone
onValueChange(value: string) => voidNone
namestringNone
<div>
  <label htmlFor="environment">Environment</label>
  <Select
    id="environment"
    name="environment"
    defaultValue="staging"
    options={[
      { value: 'staging', label: 'Staging' },
      { value: 'preview', label: 'Preview', disabled: true },
      { value: 'production', label: 'Production' },
    ]}
  />
</div>

Interactive documentation