Components
Select
Accessible dropdown picker with filled and outline triggers, standard and vibrant popups, groups, and Field integration.
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const frameworks = [
{ label: "Next.js", value: "nextjs" },
{ label: "Remix", value: "remix" },
{ label: "Astro", value: "astro" },
{ label: "Nuxt", value: "nuxt" },
{ label: "SvelteKit", value: "sveltekit" },
];
export default function Particle() {
return (
<Select items={frameworks}>
<SelectTrigger aria-label="Select framework" className="w-full max-w-60">
<SelectValue placeholder="Select a framework" />
</SelectTrigger>
<SelectPopup>
{frameworks.map((framework) => (
<SelectItem key={framework.value} value={framework.value}>
{framework.label}
</SelectItem>
))}
</SelectPopup>
</Select>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/select
Usage
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"<Select items={items}>
<SelectTrigger>
<SelectValue placeholder="Select an option" />
</SelectTrigger>
<SelectPopup>
<SelectItem value="a">Option A</SelectItem>
<SelectItem value="b">Option B</SelectItem>
</SelectPopup>
</Select>Examples
Outline
Role
import {
Select,
SelectItem,
SelectLabel,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const roles = [
{ label: "Owner", value: "owner" },
{ label: "Admin", value: "admin" },
{ label: "Editor", value: "editor" },
{ label: "Viewer", value: "viewer" },
];
export default function Particle() {
return (
<div className="flex w-full max-w-60 flex-col">
<Select defaultValue="editor" items={roles}>
<SelectLabel>Role</SelectLabel>
<SelectTrigger variant="outline">
<SelectValue placeholder="Select a role" />
</SelectTrigger>
<SelectPopup>
{roles.map((role) => (
<SelectItem key={role.value} value={role.value}>
{role.label}
</SelectItem>
))}
</SelectPopup>
</Select>
</div>
);
}
Grouped Items
import { GlobeIcon } from "lucide-react";
import {
Select,
SelectGroup,
SelectGroupLabel,
SelectItem,
SelectPopup,
SelectSeparator,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const timezones = [
{ label: "Pacific Time (PT)", value: "america-los_angeles" },
{ label: "Eastern Time (ET)", value: "america-new_york" },
{ label: "Brasilia Time (BRT)", value: "america-sao_paulo" },
{ label: "Greenwich Mean Time (GMT)", value: "europe-london" },
{ label: "Central European Time (CET)", value: "europe-paris" },
{ label: "Japan Standard Time (JST)", value: "asia-tokyo" },
];
export default function Particle() {
return (
<Select defaultValue="america-sao_paulo" items={timezones}>
<SelectTrigger
aria-label="Timezone"
className="w-full max-w-64"
startAddon={<GlobeIcon />}
>
<SelectValue placeholder="Select a timezone" />
</SelectTrigger>
<SelectPopup>
<SelectGroup>
<SelectGroupLabel>Americas</SelectGroupLabel>
<SelectItem value="america-los_angeles">Pacific Time (PT)</SelectItem>
<SelectItem value="america-new_york">Eastern Time (ET)</SelectItem>
<SelectItem value="america-sao_paulo">Brasilia Time (BRT)</SelectItem>
</SelectGroup>
<SelectSeparator />
<SelectGroup>
<SelectGroupLabel>Europe & Asia</SelectGroupLabel>
<SelectItem value="europe-london">
Greenwich Mean Time (GMT)
</SelectItem>
<SelectItem value="europe-paris">
Central European Time (CET)
</SelectItem>
<SelectItem value="asia-tokyo">Japan Standard Time (JST)</SelectItem>
</SelectGroup>
</SelectPopup>
</Select>
);
}
Vibrant Popup
"use client";
import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react";
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const themes = [
{ icon: MonitorIcon, label: "System", value: "system" },
{ icon: SunIcon, label: "Light", value: "light" },
{ icon: MoonIcon, label: "Dark", value: "dark" },
] as const;
export default function Particle() {
return (
<Select defaultValue="system" items={themes}>
<SelectTrigger aria-label="Theme" className="w-full max-w-52">
<SelectValue>
{(value: string | null) => {
const selected = themes.find((t) => t.value === value);
if (!selected) return "Select theme";
const Icon = selected.icon;
return (
<>
<Icon />
<span>{selected.label}</span>
</>
);
}}
</SelectValue>
</SelectTrigger>
<SelectPopup colorScheme="vibrant">
{themes.map((theme) => {
const Icon = theme.icon;
return (
<SelectItem key={theme.value} value={theme.value}>
<Icon />
<span>{theme.label}</span>
</SelectItem>
);
})}
</SelectPopup>
</Select>
);
}
Align Item With Trigger
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const fonts = [
{ label: "Sans-serif", value: "sans" },
{ label: "Serif", value: "serif" },
{ label: "Monospace", value: "mono" },
{ label: "System UI", value: "system" },
];
export default function Particle() {
return (
<Select defaultValue="sans" items={fonts}>
<SelectTrigger aria-label="Font family" className="w-full max-w-56">
<SelectValue placeholder="Choose a font" />
</SelectTrigger>
<SelectPopup alignItemWithTrigger>
{fonts.map((font) => (
<SelectItem key={font.value} value={font.value}>
{font.label}
</SelectItem>
))}
</SelectPopup>
</Select>
);
}
With Field
Choose the region closest to your users.
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field";
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
const regions = [
{ label: "US East (Virginia)", value: "us-east-1" },
{ label: "South America (São Paulo)", value: "sa-east-1" },
{ label: "Europe (Frankfurt)", value: "eu-central-1" },
{ label: "Asia Pacific (Tokyo)", value: "ap-northeast-1" },
];
export default function Particle() {
return (
<Field className="w-full max-w-64">
<FieldLabel>Deployment region</FieldLabel>
<Select defaultValue="sa-east-1" items={regions}>
<SelectTrigger>
<SelectValue placeholder="Select a region" />
</SelectTrigger>
<SelectPopup>
{regions.map((region) => (
<SelectItem key={region.value} value={region.value}>
{region.label}
</SelectItem>
))}
</SelectPopup>
</Select>
<FieldDescription>
Choose the region closest to your users.
</FieldDescription>
</Field>
);
}
API Reference
Select
Alias for Base UI Select.Root.
| Prop | Type | Default | Description |
|---|---|---|---|
value | Value | - | Controlled selected value |
defaultValue | Value | - | Initial uncontrolled value |
onValueChange | (value: Value, eventDetails) => void | - | Callback fired when the selected value changes |
items | Record<string, ReactNode> | Array<{ label, value }> | - | Maps values to display labels inside SelectValue |
multiple | boolean | false | Allows selecting multiple items |
disabled | boolean | false | Disables the select control |
required | boolean | false | Requires a selection for form submission |
SelectTrigger
Styled trigger button inheriting Input variants.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "filled" | "outline" | "outlined" | "filled" | Tonal filled surface or crisp outlined surface |
shape | "pill" | "round" | "rounded" | "square" | "pill" | Corner radius preset |
size | "sm" | "default" | "md" | "lg" | "default" | Trigger height, padding, and icon size |
startAddon | React.ReactNode | - | Leading element (such as an icon) |
SelectPopup
Portal, positioner, popup surface, and scrollable list (SelectContent is also exported as an alias).
| Prop | Type | Default | Description |
|---|---|---|---|
colorScheme | "standard" | "vibrant" | "standard" | Tonal popup palette inherited from menuPopupVariants |
side | "top" | "bottom" | "left" | "right" | "bottom" | Preferred side relative to the trigger |
sideOffset | number | 6 | Gap in pixels between trigger and popup |
align | "start" | "center" | "end" | "start" | Alignment along the trigger axis |
alignItemWithTrigger | boolean | false | Overlays the popup so the active item aligns over trigger |
Subcomponents
SelectValue, SelectButton, SelectItem, SelectGroup, SelectGroupLabel, SelectLabel, SelectSeparator, and SelectPortal.