Skip to content

Select

Displays a list of options for the user to pick from—triggered by a button.

Examples

Default

vue
<Select>
  <SelectTrigger>
    <SelectValue placeholder="Select a fruit" />
  </SelectTrigger>
  <SelectContent>
    <SelectGroup>
      <SelectLabel>Fruits</SelectLabel>
      <SelectItem value="apple">Apple</SelectItem>
      <SelectItem value="banana">Banana</SelectItem>
      <SelectItem value="blueberry">Blueberry</SelectItem>
      <SelectItem value="grapes">Grapes</SelectItem>
      <SelectItem value="pineapple">Pineapple</SelectItem>
    </SelectGroup>
  </SelectContent>
</Select>

Props

Select

PropTypeDefaultDescription
defaultValuestring-The default value of the select.
modelValuestring-The controlled value of the select.
defaultOpenbooleanfalseThe open state of the select when it is initially rendered.
openboolean-The controlled open state of the select.
dirltr | rtl-The reading direction of the select.
namestring-The name of the select.
autocompletestring-The autocomplete attribute of the select.
disabledbooleanfalseWhether the select is disabled.
requiredbooleanfalseWhether the select is required.

Slots

Select

SlotDescription
defaultThe content of the select.

SelectTrigger

SlotDescription
defaultThe content of the trigger.

SelectContent

SlotDescription
defaultThe items of the select.

SelectItem

SlotDescription
defaultThe content of the item.