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

PartFileDoes
NativeSelectNativeSelect.vueLets the user pick one option from a list using the browser's own picker.
NativeSelectOptGroupNativeSelectOptGroup.vueGroups related options of the native select under a shared heading.
NativeSelectOptionNativeSelectOption.vueOffers 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

NativeSelect.vue

Lets the user pick one option from a list using the browser's own picker. Renders a <div>.

Props 3

PropTypeDefault
modelValueAcceptableValue | AcceptableValue[]—
classClassValue—
size'md' | 'sm'—

Events 1

EventPayload
update:modelValue—

Data attributes 1

Data attributeValues
data-size'md' | 'sm'

Recipe native-select 3 groups

Recipe native-select-chevron 1 group

Recipe native-select-root 2 groups

NativeSelectOptGroup.vue

NativeSelectOption.vue
Native Select
State