Skip to content
OTF Kit logoOTF Kit

Shadcn-style Combobox

Input

Shadcn-style combobox for React. Autocomplete combo box with searchable options and keyboard navigation.

View in Storybook
Combobox
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.

PropTypeDefaultDescription
optionsrequiredComboboxOption[]
classNamestring
contentWidth'trigger' | 'auto''trigger'Width of the popover content. Defaults to match the trigger.
disabledboolean
emptyMessagestring'No results.'
onChange(value: string) => void
placeholderstring'Select…'
searchPlaceholderstring'Search…'
valuestring

Related