Skip to content

VPick

A custom dropdown triggered by a button, with full keyboard navigation and group labels. Vue 3 only in the current release.

Usage

Options

Accepts the same options shape as VPickNative — flat arrays and grouped arrays both work.

Examples

Grouped

Separators + rotate icon

Props

These props apply to both VPickNative and VPick:

PropTypeDefaultDescription
modelValueanyundefinedSelected 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.

VPick-only props

PropTypeDefaultDescription
separatorsbooleanfalseRenders a horizontal divider between adjacent groups in the dropdown.
rotateIconbooleanfalseRotates the trigger chevron 180° when the dropdown is open.

Slots

SlotDescription
iconCustom chevron icon. Shown when not loading.
loadingCustom loading indicator. Shown when loading is true.

Keyboard navigation

KeyAction
Enter / SpaceOpen dropdown / select focused option
EscapeClose dropdown
/ Move focus between options
HomeFocus first option
EndFocus last option
TabClose dropdown and move focus

Accessibility

  • WAI-ARIA listbox pattern (role="combobox", role="listbox", role="option").
  • aria-expanded reflects open state on the trigger button.
  • aria-activedescendant tracks the focused option.
  • aria-invalid is set when the error prop is present.
  • aria-disabled on individual disabled options.
  • A visually hidden native <select> is kept in sync for form submission and Safari autofill.

Released under the MIT License.