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
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue / value | any | undefined | Selected value. Use v-model for two-way binding. |
options | OptionOrGroup[] | required | Array of options or option groups. |
placeholder | string | undefined | Placeholder text shown when no value is selected. |
disabled | boolean | false | Disables the select. |
loading | boolean | false | Shows a spinner and disables interaction. |
error | string | undefined | Error message. Applies error styling and aria-invalid. |
size | "default" | "sm" | "default" | Size variant. |
id | string | undefined | HTML id attribute. |
name | string | undefined | HTML name attribute for form submission. |
required | boolean | false | HTML required attribute. |
ariaLabel | string | undefined | aria-label for accessibility. |
ariaDescribedby | string | undefined | aria-describedby for accessibility. |
Slots
| Slot | Description |
|---|---|
icon | Custom chevron icon. Shown when not loading. |
loading | Custom 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-invalidis set when theerrorprop is present.aria-busyis set whenloadingis true.aria-describedbywired via theariaDescribedbyprop.- Disabled state uses native
disabledattribute (not pointer-events).