Shadcn-style Combobox
InputShadcn-style combobox for React. Autocomplete combo box with searchable options and keyboard navigation.
ComboboxInput · Web
Loading Storybook preview…
Installation
bun add @otfdashkit/ui
Usage
Import Combobox from @otfdashkit/ui.
Code
// Combobox — Shadcn-style combobox for React. Autocomplete combo box with searchable options and keyboard navigation.
//
// Install:
// bun add @otfdashkit/ui
import { Combobox } from '@otfdashkit/ui'
export function Example() {
return (
<Combobox>
{/* your content */}
</Combobox>
)
}Props
Props declared in the Combobox source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| optionsrequired | ComboboxOption[] | ||
| className | string | ||
| contentWidth | 'trigger' | 'auto' | 'trigger' | Width of the popover content. Defaults to match the trigger. |
| disabled | boolean | ||
| emptyMessage | string | 'No results.' | |
| onChange | (value: string) => void | ||
| placeholder | string | 'Select…' | |
| searchPlaceholder | string | 'Search…' | |
| value | string |