NativeSelect

A styled native <select> that keeps platform form/keyboard behavior with a custom chevron and focus ring

Category: inputs · WCAG 2.2-AA · inputs, select, native, form, dropdown

Sizes

States

Props

PropTypeDefaultDescription
optionsNativeSelectOption[]—Options to render. Alternatively pass <option> children.
childrenReact.ReactNode—Raw <option> children (used when options is not provided).
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
invalidboolean—Marks the control as invalid for error styling and a11y.
placeholderstring—Placeholder rendered as a disabled, hidden first option.
valuestring—The controlled value.
defaultValuestring—The initial value when uncontrolled.
onChangeReact.ChangeEventHandler<HTMLSelectElement>—Called when the selected value changes.
disabledboolean—When true, disables the control and removes it from the tab order.
classNamestring—Additional CSS class names merged onto the root element.

Design tokens

When to use

When not to use

How to build an accessible NativeSelect in React →

Examples

Basic

<NativeSelect
  placeholder="Choose a country"
  options={[
    { value: 'us', label: 'United States' },
    { value: 'de', label: 'Germany' },
  ]}
  onChange={(e) => setCountry(e.target.value)}
/>

Option children

<NativeSelect size="sm" defaultValue="light" aria-label="Theme">
  <option value="light">Light</option>
  <option value="dark">Dark</option>
</NativeSelect>

Invalid

<NativeSelect invalid placeholder="Required" options={countries} />

Related components

← Back to docs