Oros UI

Search documentation

Search Oros UI pages and components.

Combobox

Combines a text field with a searchable list of options.

Installation

Install Combobox from Oros with shadcn CLI 4.13.0.

pnpm dlx shadcn@4.13.0 add @oros/combobox

Usage

import {
  Combobox,
  ComboboxInput,
  ComboboxContent,
  ComboboxList,
  ComboboxItem,
  ComboboxGroup,
} from "@/components/ui/combobox"

Open the Source tab in the preview for a complete working example.

Anatomy

ExportResponsibility
ComboboxThe root component that owns the primary structure and state.
ComboboxInputCaptures or exposes the current value.
ComboboxContentContains the primary visible content.
ComboboxListA composable part of the component anatomy.
ComboboxItemRepresents one option or repeated child.
ComboboxGroupGroups related items into one logical set.
ComboboxLabelProvides a visible label for its related control or value.
ComboboxCollectionA composable part of the component anatomy.
ComboboxEmptyA composable part of the component anatomy.
ComboboxSeparatorVisually and semantically separates related groups.
ComboboxChipsA composable part of the component anatomy.
ComboboxChipA composable part of the component anatomy.
ComboboxChipsInputCaptures or exposes the current value.
ComboboxTriggerControls opening, selection, or disclosure behavior.
ComboboxValueDisplays or exposes the current value.
useComboboxAnchorReads or controls the component's shared state.

API Reference

Combobox exports 16 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.

  • Combobox Component
  • ComboboxInput Component
  • ComboboxContent Component
  • ComboboxList Component
  • ComboboxItem Component
  • ComboboxGroup Component
  • ComboboxLabel Component
  • ComboboxCollection Component
  • ComboboxEmpty Component
  • ComboboxSeparator Component
  • ComboboxChips Component
  • ComboboxChip Component
  • ComboboxChipsInput Component
  • ComboboxTrigger Component
  • ComboboxValue Component
  • useComboboxAnchor Hook

Accessibility

  • Provide Combobox with a visible label or an equivalent programmatic accessible name.
  • Expose disabled, required, selected, and invalid states through the component API instead of color alone, and keep keyboard focus visible.

Source

Combobox uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.