Docs
Select
Select
Displays a list of options for the user to pick from—triggered by a button.
Installation
bash
npx shadcn-vue@latest add select
Usage
vue
<script setup lang="ts">
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
} from '@/lib/registry/default/ui/select'
</script>
<template>
<Select>
<SelectTrigger>
<SelectValue placeholder="Select a fruit" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectLabel>Fruits</SelectLabel>
<SelectItem value="apple">
Apple
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</template>