Back to Components

Form

NativeSelect

System <select> with our chrome. Use when the OS-native picker is preferred — mobile drawers, screen-reader-friendly forms, server-rendered pages without JS hydration.

Examples

Default

<NativeSelect
  bind:value={format}
  options={[
    {value: 'epub', label: 'EPUB'},
    {value: 'pdf', label: 'PDF'},
    {value: 'txt', label: 'Plain text'},
  ]}
/>

Props

PropTypeDefaultDescription
options{value, label, disabled?}[]Option definitions.
valueTBindable selected value.
placeholderstringDisabled first option shown when no value.
size'sm' | 'md''md'Height tier.
...restHTMLSelectAttributesSpread onto the underlying <select>.

Install

CLI

npx @a3tai/mittsu add native-select