About
A searchable, keyboard-navigable dropdown for picking one or multiple options from a filterable list, with removable chips for multi-select.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Combobox to your project and fits it to your theme.
Code
How Combobox is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import {
Combobox,
ComboboxInput,
ComboboxContent,
ComboboxEmpty,
ComboboxList,
ComboboxItem,
} from "@/components/ui/combobox";
const frameworks = ["Astro", "Next.js", "React", "SvelteKit", "Vue"];
export default function ComboboxDemo() {
const [framework, setFramework] = React.useState<string | null>(null);
return (
<div className="flex min-h-[360px] w-full items-center justify-center bg-background p-10 text-foreground">
<div className="flex w-full max-w-sm flex-col gap-3">
<Combobox
items={frameworks}
value={framework}
onValueChange={setFramework}
>
<ComboboxInput
aria-label="Framework"
placeholder="Choose a framework…"
showClear
/>
<ComboboxContent>
<ComboboxEmpty>No frameworks match.</ComboboxEmpty>
<ComboboxList>
{frameworks.map((item) => (
<ComboboxItem key={item} value={item}>
{item}
</ComboboxItem>
))}
</ComboboxList>
</ComboboxContent>
</Combobox>
<p className="text-sm text-muted-foreground">
Framework: {framework ?? "not selected"}
</p>
</div>
</div>
);
}








