Form
Select
Base UI select styled like Lilt inputs. Borderful popup, no shadows, dropdown positioning.
Show codeHide code
"use client";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/registry/lilt/ui/select";
const paces = [
{ label: "Daily", value: "daily" },
{ label: "Weekly", value: "weekly" },
{ label: "Monthly", value: "monthly" },
{ label: "Only when it matters", value: "important" },
];
export default function SelectDemo() {
return (
<div className="w-full max-w-64">
<Select items={paces}>
<SelectTrigger aria-label="Digest pace">
<SelectValue placeholder="Pick a pace" />
</SelectTrigger>
<SelectContent>
{paces.map((pace) => (
<SelectItem key={pace.value} value={pace.value}>
{pace.label}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
);
}Installation
npx shadcn@latest add @lilt/selectAccessibility
- Full keyboard support: arrows, type-ahead, Home/End, Escape.
- The trigger needs an aria-label when used without a visible label — or wrap it in a Field.