bearnie

Combobox

A searchable dropdown for selecting one option.

Installation

npx bearnie add combobox
npx bearnie add combobox

Usage

import { Combobox } from "@/components/bearnie/combobox"
<Combobox
  options={[
    { value: "lexington", label: "lexingtonthemes.com" },
    { value: "colors-fonts", label: "colorsandfonts.com" },
  ]}
  placeholder="Select a domain"
/>

Examples

Clearable

Grouped options

Rich items

Input-group addon

Anatomy

  • Combobox - Root searchable select component.
  • ComboboxTrigger - Trigger button for opening the options list.
  • ComboboxContent - Popover content container.
  • ComboboxItem - Selectable option row.

Props

Combobox

Prop Type Default Description
options ComboboxOption[] | ComboboxGroup[] [] Flat options or grouped options
value string “” Initial selected value
name string - Hidden input name for form submissions
placeholder string “Select an option” Trigger placeholder text
searchPlaceholder string “Search…” Search input placeholder
emptyMessage string “No results found.” Empty state label
disabled boolean false Disables trigger and selection
clearable boolean false Shows clear action when a value is selected
inputGroupControl boolean false Adapts trigger for InputGroup composition
class string - Additional CSS classes

Events

  • combobox-change - Emitted on selection with { value, label } detail.