Combobox
Preview
Workspace
Install
Add it with your package manager, or copy the source manually.
Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide
Download the release archive to your project root, then install the local file.
Import the shared styles once in your application.
API Reference
ComboboxContent
side?"top" | "bottom"Which side of the field the panel opens on.
bottomalign?"start" | "center" | "end"Alignment along the field's edge.
startsideOffset?numberGap between field and panel, in px.
6avoidCollisions?booleanFlip to the other side when the preferred one does not fit.
trueclass?string—#default?slot—Combobox
v-model?stringundefineddefaultValue?stringundefinedv-model:open?booleanundefineddefaultOpen?booleanfalsev-model:query?stringundefineddefaultQuery?stringfilter?ComboFilterdefaultFilterdisabled?booleanfalseclass?string—labels?ComboLabelsOverride any built-in string.
—options?readonly ChoiceOption[]Render the field from a list of options instead of composing parts.
undefinedlabel?stringAccessible name of the search input.
—placeholder?string—empty?stringText shown when nothing matches.
—listLabel?stringAccessible name of the list.
—side?"top" | "bottom"bottomalign?"start" | "center" | "end"startsideOffset?number6avoidCollisions?booleantruegroupSeparator?booleanDraw a divider between option groups.
—showIcon?booleanShow the search glyph in the input (always on for the single combobox).
—triggerStyle?ComboStyle—contentStyle?ComboStyle—listStyle?ComboStyle—name?stringForm field name; a hidden input carries the selected value.
—#default?slot—#option?{ option: ChoiceOption; selected: boolean; active: boolean }Row content in `options` mode.
—ComboboxEmpty
class?string—#default?slot—ComboboxGroup
class?string—#default?slot—ComboboxItem
valuestring—textValue?stringPlain-text label used for filtering, the input and chips. Defaults to the item's text when it is plain text, else `value`.
—keywords?string[]Extra words the filter matches besides the label.
[]disabled?booleanfalse@select?(value: string) => voidFires when this option is chosen.
—class?string—#default?{ selected: boolean; active: boolean }—ComboboxLabel
class?string—#default?slot—ComboboxList
ariaLabel?stringAccessible name of the list.
—class?string—#default?slot—ComboboxSeparator
class?string—ComboboxInput
wrapperClassName?stringClass for the element that wraps the icon and the input.
—class?string—ComboboxTrigger
class?string—#default?slot—ComboboxValue
placeholder?string—class?string—#default?{ value: string | undefined; label: string | undefined }Replaces the label.
—#placeholder?slotPlaceholder content when nothing is selected.
—Composition
Place the searchable input inside the trigger, then compose listbox primitives inside the portalled content.
Combobox
├── ComboboxTrigger
│ └── ComboboxInput
└── ComboboxContent
└── ComboboxList
├── ComboboxEmpty
├── ComboboxGroup
│ ├── ComboboxLabel
│ └── ComboboxItem
└── ComboboxSeparatorHow it works
A combobox combines text input with a filtered listbox while keeping focus in the input. It manages search, active-option navigation, selection, and portal positioning without owning the option data or surrounding form.
Updated