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
| Prop | Type | Default | Description |
|---|---|---|---|
options | {value, label, disabled?}[] | — | Option definitions. |
value | T | — | Bindable selected value. |
placeholder | string | — | Disabled first option shown when no value. |
size | 'sm' | 'md' | 'md' | Height tier. |
...rest | HTMLSelectAttributes | — | Spread onto the underlying <select>. |
Install
CLI
npx @a3tai/mittsu add native-select