››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.
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 />
<NativeSelectOptGroup>
<NativeSelectOption />
</NativeSelectOptGroup>
</NativeSelect>Styling
All of Native Select’s styles live in native-select.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @lucide/vue
- @vueuse/core
- class-variance-authority
- reka-ui
API reference
Lets the user pick one option from a list using the browser's own picker. Renders a <div>.
Props 3
| Prop | Type | Default | |
|---|---|---|---|
| modelValue | AcceptableValue | AcceptableValue[] | — | |
| |||
| class | ClassValue | — | |
| |||
| size | 'md' | 'sm' | — | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:modelValue | — | |
| ||
Data attributes 1
| Data attribute | Values | |
|---|---|---|
| data-size | 'md' | 'sm' | |
| ||
Recipe native-select 3 groups
typography typography.small400 0.875rem/1.43 'Inter Variable', Inter, sans-serif
paddingY spacing.20.5rem
paddingStart spacing.00rem
paddingEnd spacing.82rem
textColor :placeholderShowncolors.muted-foreground#66666f
height spacing.102.5rem
height spacing.92.25rem
Recipe native-select-chevron 1 group
textColor colors.muted-foreground#66666f
size spacing.3.50.875rem
Recipe native-select-root 2 groups
width fit
opacity opacity.500.5
Native Select