native-select
Native Select
The browser's own select, for choices autofill or the phone's picker should fill, such as a country in an address; mutes the empty option as a placeholder.
States: Default, Focus, Disabled, Invalid
Parts
| Part | File | Does |
|---|---|---|
| NativeSelect | NativeSelect.vue | Lets the user pick one option from a list using the browser's own picker. |
| NativeSelectOptGroup | NativeSelectOptGroup.vue | Groups related options of the native select under a shared heading. |
| NativeSelectOption | NativeSelectOption.vue | Offers one choice the user can pick in the native select. |
Anatomy
<NativeSelect>
<NativeSelectOption />
</NativeSelect>Styling
| Part | Recipe |
|---|---|
| NativeSelect | native-select-root |
| NativeSelect | native-select |
| NativeSelect | native-select-chevron |
| NativeSelectOptGroup | native-select-option |
| NativeSelectOption | native-select-option |
Install
Writes 4 files into components/ui/native-select/. For agents, npx @frontic/ui docs native-select prints this reference as markdown; the MCP server serves the same.
- npm packages
- @lucide/vue
- @vueuse/core
- class-variance-authority
- reka-ui
API reference
NativeSelect NativeSelect.vue
Lets the user pick one option from a list using the browser's own picker. Renders a <div>.
| Prop | Type | Default | |
|---|---|---|---|
| modelValue | AcceptableValue | AcceptableValue[] | — | |
| class | ClassValue | — | |
| size | 'md' | 'sm' | — | |
| Event | Payload | |
|---|---|---|
| update:modelValue | — | |
| Data attribute | Values | |
|---|---|---|
| data-size | 'md' | 'sm' | |
| Recipe native-select-root | Sets | |
|---|---|---|
| base: native-select-root | 1 property | |
| disabledshared state | 1 property | |
| Recipe native-select | Sets | |
|---|---|---|
| base: native-select | 17 properties · 12 inherited | |
| size: mddefault | 1 property | |
| size: sm | 1 property | |
| Recipe native-select-chevron | Sets | |
|---|---|---|
| base: native-select-chevron | 2 properties | |
NativeSelectOptGroup NativeSelectOptGroup.vue
NativeSelectOption NativeSelectOption.vue
Example