Combobox
A searchable select input with autocomplete functionality.
Made by eblairmckeePowered by
Loading component...
When to use
Use this decision tree to determine when to use the Combobox component:
Installation
Usage
import { Combobox } from "@/components/ui/combobox""use client"
import React from "react"
import { Combobox } from "@/components/ui/combobox"
const frameworks = [
{
value: "next.js",
label: "Next.js",
},
{
value: "sveltekit",
label: "SvelteKit",
},
{
value: "nuxt.js",
label: "Nuxt.js",
},
{
value: "remix",
label: "Remix",
},
{
value: "astro",
label: "Astro",
},
]
export function ComboboxDemo() {
const [value, setValue] = React.useState("")
return (
<Combobox
options={frameworks}
value={value}
onChange={setValue}
placeholder="Select framework..."
/>
)
}Examples
Basic Combobox
Loading component...
Form Integration
Loading component...
Creatable Options
Loading component...
Disabled State
Loading component...
Credits
- We take our inspiration from Shadcn UI for the combobox component and style.
Built by malinskibeniamin. The source code is available on GitHub.