Binhlaig UI Component
ComboBox
A searchable input combined with a predefined list of selectable options.
Installation
Install Combobox in your project.
Terminal
npx binhlaig-ui@latest add comboboxFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
Import the ComboBox primitives you need.
import {
Combobox,
ComboboxClear,
ComboboxEmpty,
ComboboxInput,
ComboboxInputGroup,
ComboboxItem,
ComboboxItemIndicator,
ComboboxList,
ComboboxPopup,
ComboboxPortal,
ComboboxPositioner,
ComboboxTrigger,
} from "@/components/ui/combobox"Basic
Filter and select from a predefined list.
Controlled Value
Manage the selected option from React state.
Selected:Next.js
Grouped Options
Organize large option lists into readable groups.
Disabled
Disable the complete control when selection is unavailable.
API Reference
Main primitives available in Binhlaig UI ComboBox.
| Component | Purpose |
|---|---|
Combobox | Controls items, value and open state. |
ComboboxInput | Filters available options. |
ComboboxTrigger | Opens or closes the popup. |
ComboboxClear | Clears the selected option. |
ComboboxPopup | Floating option container. |
ComboboxList | Renders available items. |
ComboboxItem | A selectable option. |
ComboboxItemIndicator | Marks the selected option. |
ComboboxEmpty | Shown when filtering has no results. |
ComboboxGroup | Groups related options. |