Installation
Usage
Component API
Combobox
The root component built on@base-ui/react Combobox primitive.
Props:
items- Array of items to displayvalue- Controlled valueonValueChange- Callback when value changesmultiple- Enable multi-select modeitemToStringValue- Convert object items to stringautoHighlight- Auto-highlight first item on filterdisabled- Disable the combobox
ComboboxInput
The input field for searching and selecting items. Props:showTrigger- Show dropdown trigger button (default:true)showClear- Show clear button (default:false)disabled- Disable the inputplaceholder- Placeholder text
ComboboxContent
The dropdown content container. Props:side- Placement side (default:"bottom")sideOffset- Offset from anchor (default:6)align- Alignment (default:"start")alignOffset- Alignment offset (default:0)anchor- Custom anchor element
ComboboxItem
An individual selectable item. Props:value- Item valuedisabled- Disable the item
Examples
Custom Items
UseitemToStringValue when your items are objects:
Multiple Selection
Usemultiple with chips for multi-select behavior:
With Groups
Organize items into labeled groups:Clear Button
Use theshowClear prop to show a clear button:
Invalid State
Use thearia-invalid prop to mark the combobox as invalid:
Disabled
Use thedisabled prop to disable the combobox:
Accessibility
- Built on
@base-ui/reactfor full accessibility support - Keyboard navigation with arrow keys
- Type-ahead search functionality
- Screen reader announcements for state changes
- Focus management