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.ReactNodeRaw <option> children (used when options is not provided).
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
invalidbooleanMarks the control as invalid for error styling and a11y.
placeholderstringPlaceholder rendered as a disabled, hidden first option.
valuestringThe controlled value.
defaultValuestringThe initial value when uncontrolled.
onChangeReact.ChangeEventHandler<HTMLSelectElement>Called when the selected value changes.
disabledbooleanWhen true, disables the control and removes it from the tab order.
classNamestringAdditional 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