Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Select

Select

Select.vue

Install

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

bunx --bun shadcn-vue@latest add @beui-vue/select

Import the shared styles once in your application.

TSUsage
import Select from '@/components/beui/controls/choice/Select.vue'
import '@/components/beui/styles.css'

API Reference

Select

v-model?
string

Selected value (`v-model`). Leave unset for an uncontrolled select that starts at `defaultValue`.

Default—
defaultValue?
string
Default—
v-model:open?
boolean

Controlled 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.

Defaultundefined
defaultOpen?
boolean

Uncontrolled initial open state. Default false.

Defaultfalse
disabled?
boolean
Defaultfalse
class?
string
Default—
options?
readonly ChoiceOption[]

Shortcut for the common case: renders a trigger, a value and one item per option instead of the default slot.

Default—
placeholder?
string

Placeholder shown by the shortcut's value while nothing is selected.

Default—
label?
string

Accessible name for the list. Falls back to the trigger.

Default—
name?
string

Form field name; renders a hidden input carrying the selected value.

Default—
labels?
Partial<SelectMessages>

Override any built-in string.

Default—
#default?
slot

`SelectTrigger`, `SelectContent` and their children.

Default—
#value?
slot

With `options`: replaces the trigger's value.

Default—
#option?
slot

With `options`: replaces an item's content.

Default—

SelectTrigger

class?
string
Default—
#default?
slot
Default—

SelectValue

placeholder?
string

Shown while nothing is selected. Defaults to `labels.valuePlaceholder` ("Select").

Default—
class?
string
Default—

SelectContent

class?
string
Default—
#default?
slot
Default—

SelectItem

value
string
Default—
disabled?
boolean
Defaultfalse
class?
string
Default—
label?
string

Text shown in `SelectValue` and used for typeahead. Defaults to the children's text, or `value` when they are not plain text.

Default—
#default?
slot
Default—

Morph Select

MorphSelect.vue

Install

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

bunx --bun shadcn-vue@latest add @beui-vue/select-morph

Import the shared styles once in your application.

TSUsage
import SelectMorph from '@/components/beui/controls/choice/MorphSelect.vue'
import '@/components/beui/styles.css'

API Reference

MorphSelect

v-model?
string

Selected value (`v-model`). Leave unset for an uncontrolled select that starts at `defaultValue`.

Default—
defaultValue?
string
Default—
disabled?
boolean
Defaultfalse
class?
string
Default—
options?
readonly ChoiceOption[]

Shortcut for the common case: renders a trigger, a value and one item per option instead of the default slot.

Default—
placeholder?
string

Placeholder shown by the shortcut's value while nothing is selected.

Default—
label?
string

Accessible name for the list. Falls back to the panel header.

Default—
name?
string

Form field name; renders a hidden input carrying the selected value.

Default—
labels?
Partial<SelectMessages>

Override any built-in string.

Default—
#default?
slot

`MorphSelectTrigger`, `MorphSelectContent` and their children.

Default—
#value?
slot

With `options`: replaces the trigger's value.

Default—
#option?
slot

With `options`: replaces an item's content.

Default—

MorphSelectValue

placeholder?
string

Shown while nothing is selected, in the trigger and the open panel's header. Defaults to `labels.valuePlaceholder` ("Select").

Default—
class?
string
Default—

MorphSelectTrigger

class?
string
Default—
#default?
slot
Default—

MorphSelectContent

class?
string
Default—
#default?
slot
Default—

MorphSelectItem

value
string
Default—
disabled?
boolean
Defaultfalse
class?
string
Default—
label?
string

Text shown in `MorphSelectValue` and used for typeahead. Defaults to the children's text, or `value` when they are not plain text.

Default—
#default?
slot
Default—
Also on React Native. A panel that unfolds out of its trigger.(opens in a new tab)

Updated