Pick one or more options from a list that opens on the current value, with typeahead, groups and form support.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- cn
- @base-ui/react
- @tabler/icons-react
- class-variance-authority
Code
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
const fonts = [
{ value: "inter", label: "Inter" },
{ value: "geist", label: "Geist" },
{ value: "ibm-plex", label: "IBM Plex Sans" },
{ value: "source-serif", label: "Source Serif" },
{ value: "jetbrains", label: "JetBrains Mono" },
]
export function SelectDemo() {
return (
<Select items={fonts} defaultValue="geist">
<SelectTrigger aria-label="Font" className="w-48">
<SelectValue />
</SelectTrigger>
<SelectContent>
{fonts.map((font) => (
<SelectItem key={font.value} value={font.value}>
{font.label}
</SelectItem>
))}
</SelectContent>
</Select>
)
}
































