select

Select

Lets the user pick one option from a list that opens below the trigger at its width, joining a Field.

Parts

PartFileDoes
SelectSelect.vueGroups all parts of the select.
SelectContentSelectContent.vueHolds the options of the select while it is open.
SelectGroupSelectGroup.vueGroups related options of the select.
SelectItemSelectItem.vueOffers one option the user can pick in the select.
SelectItemTextSelectItemText.vueHolds the text of an option, which the select shows once chosen.
SelectLabelSelectLabel.vueLabels a group of options in the select.
SelectScrollDownButtonSelectScrollDownButton.vueScrolls the options down when the list is longer than the view.
SelectScrollUpButtonSelectScrollUpButton.vueScrolls the options up when the list is longer than the view.
SelectSeparatorSelectSeparator.vueSeparates groups of options in the select.
SelectTriggerSelectTrigger.vueOpens and closes the list of options in the select.
SelectValueSelectValue.vueShows the chosen option, or a placeholder when nothing is chosen.

Anatomy

<Select>
  <SelectTrigger>
    <SelectValue />
  </SelectTrigger>
  <SelectContent>
    <SelectGroup>
      <SelectLabel />
      <SelectItem>
        <SelectItemText />
      </SelectItem>
    </SelectGroup>
    <SelectSeparator />
  </SelectContent>
</Select>

Styling

All of Select’s styles live in select.json. New to styling in Frontic UI? How styling works →

Install

Installs with it
focus
npm packages
@lucide/vue
@vueuse/core
class-variance-authority
reka-ui

API reference

Select.vue

Groups all parts of the select.

Props 12

PropTypeDefault
openboolean—
defaultOpenbooleanfalse
defaultValueAcceptableValue | AcceptableValue[]—
modelValueAcceptableValue | AcceptableValue[]—
nullableValuestring''
bystring | ((a: AcceptableValue, b: AcceptableValue) => boolean)—
dirDirection—
multiplebooleanfalse
autocompletestring—
disabledbooleanfalse
namestring—
requiredbooleanfalse

Events 2

EventPayload
update:modelValuevalue: AcceptableValue
update:openvalue: boolean

Slots 1

SlotSlot props
default{ modelValue: AcceptableValue | AcceptableValue[] | undefined; open: boolean; }

SelectContent.vue

SelectGroup.vue

SelectItem.vue

SelectItemText.vue

SelectLabel.vue

SelectScrollDownButton.vue

SelectScrollUpButton.vue

SelectSeparator.vue

SelectTrigger.vue

SelectValue.vue
Select
State