Select
Select
Select.vueInstall
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
Select
v-model?stringSelected value (`v-model`). Leave unset for an uncontrolled select that starts at `defaultValue`.
—defaultValue?string—v-model:open?booleanControlled open state of the panel (`v-model:open`). A layout that stacks selects can hold this to keep exactly one panel open — the panel is absolutely positioned inside its field, so two open at once paint over each other's options.
undefineddefaultOpen?booleanUncontrolled initial open state. Default false.
falsedisabled?booleanfalseclass?string—options?readonly ChoiceOption[]Shortcut for the common case: renders a trigger, a value and one item per option instead of the default slot.
—placeholder?stringPlaceholder shown by the shortcut's value while nothing is selected.
—label?stringAccessible name for the list. Falls back to the trigger.
—name?stringForm field name; renders a hidden input carrying the selected value.
—labels?Partial<SelectMessages>Override any built-in string.
—#default?slot`SelectTrigger`, `SelectContent` and their children.
—#value?slotWith `options`: replaces the trigger's value.
—#option?slotWith `options`: replaces an item's content.
—SelectTrigger
class?string—#default?slot—SelectValue
placeholder?stringShown while nothing is selected. Defaults to `labels.valuePlaceholder` ("Select").
—class?string—SelectContent
class?string—#default?slot—SelectItem
valuestring—disabled?booleanfalseclass?string—label?stringText shown in `SelectValue` and used for typeahead. Defaults to the children's text, or `value` when they are not plain text.
—#default?slot—Morph Select
MorphSelect.vueInstall
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
MorphSelect
v-model?stringSelected value (`v-model`). Leave unset for an uncontrolled select that starts at `defaultValue`.
—defaultValue?string—disabled?booleanfalseclass?string—options?readonly ChoiceOption[]Shortcut for the common case: renders a trigger, a value and one item per option instead of the default slot.
—placeholder?stringPlaceholder shown by the shortcut's value while nothing is selected.
—label?stringAccessible name for the list. Falls back to the panel header.
—name?stringForm field name; renders a hidden input carrying the selected value.
—labels?Partial<SelectMessages>Override any built-in string.
—#default?slot`MorphSelectTrigger`, `MorphSelectContent` and their children.
—#value?slotWith `options`: replaces the trigger's value.
—#option?slotWith `options`: replaces an item's content.
—MorphSelectValue
placeholder?stringShown while nothing is selected, in the trigger and the open panel's header. Defaults to `labels.valuePlaceholder` ("Select").
—class?string—MorphSelectTrigger
class?string—#default?slot—MorphSelectContent
class?string—#default?slot—MorphSelectItem
valuestring—disabled?booleanfalseclass?string—label?stringText shown in `MorphSelectValue` and used for typeahead. Defaults to the children's text, or `value` when they are not plain text.
—#default?slot—Updated