Skip to content

VPickNative

A styled wrapper around the native <select> element. Same browser behaviour, consistent design. Available for Vue 2.7 and Vue 3.

Usage

Vue 2.7

Same code — just change the import to import { VPickNative } from "vue-pick/vue2".

Options

The options prop accepts a flat array or a nested array with groups. Groups are detected automatically when an item has an options array.

Examples

Grouped

Disabled

Loading

Error

Sizes

Props

PropTypeDefaultDescription
modelValue / valueanyundefinedSelected value. Use v-model for two-way binding.
optionsOptionOrGroup[]requiredArray of options or option groups.
placeholderstringundefinedPlaceholder text shown when no value is selected.
disabledbooleanfalseDisables the select.
loadingbooleanfalseShows a spinner and disables interaction.
errorstringundefinedError message. Applies error styling and aria-invalid.
size"default" | "sm""default"Size variant.
idstringundefinedHTML id attribute.
namestringundefinedHTML name attribute for form submission.
requiredbooleanfalseHTML required attribute.
ariaLabelstringundefinedaria-label for accessibility.
ariaDescribedbystringundefinedaria-describedby for accessibility.

Slots

SlotDescription
iconCustom chevron icon. Shown when not loading.
loadingCustom loading indicator. Shown when loading is true.
vue
<VPickNative :options="options">
  <template #icon>
    <MyCustomChevron />
  </template>
  <template #loading>
    <MySpinner />
  </template>
</VPickNative>

Accessibility

  • Uses a real native <select> element — full browser and screen reader support.
  • aria-invalid is set when the error prop is present.
  • aria-busy is set when loading is true.
  • aria-describedby wired via the ariaDescribedby prop.
  • Disabled state uses native disabled attribute (not pointer-events).

Released under the MIT License.