VPickNative
A styled wrapper around the native <select> element. Same browser behaviour, consistent design.
Vue 2.7
Same code works in Vue 2.7. Just change the import to import { VPickNative } from "vue-pick/vue2".
| Page | What it covers |
|---|---|
| Forms | Labelling, submission, validation |
| Accessibility | Keyboard, screen readers, state |
| API | Every prop, slot, and event in one place |
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.
Grouped
Custom data shape
Use labelKey, valueKey, disabledKey, and groupOptionsKey to pass data straight from your API without mapping. See the Data Shape guide for the full reference.
States
Disabled
Loading
Error
Height
Set --vpick-height-default to resize the control. There is no size prop.
Every other visual token is a CSS custom property too, and most are shared with VPick. See Theming.
Core props
The rest are on the API Reference.
modelValueany default undefinedSelected value. Use v-model for two-way binding. In Vue 2 the prop is value.
placeholderstring default undefinedText shown when no value is selected.
disabledboolean default falseDisables the control.
loadingboolean default falseShows a spinner and disables interaction.
errorstring default undefinedError message. Applies error styling and aria-invalid.
idstring default undefinedHTML id, applied to the control itself so a <label for> resolves to it.
requiredboolean default falseHTML required attribute.
ariaLabelstring default undefinedaria-label, for when there is no visible label.
ariaDescribedbystring default undefinedaria-describedby, for wiring up hint or error text.