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

Menu

Select

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