saturation/uisaturation/ui
DocsComponentsBlocksPages
GitHub

Sections

IntroductionComponentsInstallationMCPTheming

Components

ComponentsAccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBeamBlur FadeBorder TrailBreadcrumbButtonButton GroupCalendar PickerCardChartCheckboxCollapsibleComboboxCommandComparison SliderContext MenuCredit CardData TableDate PickerDialogDropdown MenuEmoji PickerEmptyFieldFiltersFull CalendarGlow EffectInputInput GroupInput OTPItemKanbanKbdMenubarNavigation MenuNovel EditorPaginationParallaxProgressProgressive BlurRadio GroupRippleSelectSeparatorSheetSkeletonSliderSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Docs/Components/Combobox

Combobox

Autocomplete input with dropdown selection. Supports single/multi-select, controlled search with loading state, and custom option rendering.

Loading...

Installation

pnpm dlx shadcn@latest add https://ui.saturation.io/r/combobox.json

Tailwind v4 — Source Scanning

Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import { Combobox } from "@/components/ui/combobox"
<Combobox
  options={[
    { value: "apple", label: "Apple" },
    { value: "banana", label: "Banana" },
  ]}
  value={value}
  onValueChange={(next) => setValue(next as string)}
  placeholder="Select a fruit..."
/>

Examples

With Status

Loading...
Combobox with status indicators.

With Icon

Loading...
Combobox with icons.

With User

Loading...
User selection with avatars.

With Groups

Loading...
Grouped options.

Multiple

Loading...
Multiple selection.

API Reference

PropTypeDefaultDescription
options*ComboboxOption[]—Available options. Each has { value, label, description? }.
value*string | string[]—Selected value(s). String for single-select, string[] for multi-select.
onValueChange*(value: string | string[]) => void—Called when selection changes.
multiplebooleanfalseEnable multi-select mode.
onSearch(query: string) => void—Controlled search — disables cmdk's built-in filtering. Caller updates options in response.
placeholderstring"Select..."Trigger placeholder when nothing is selected.
searchPlaceholderstring"Search..."Search input placeholder.
emptyMessagestring"No results."Message shown when no options match.
disabledbooleanfalseDisable the trigger.
loadingbooleanfalseShow loading indicator in the popover.
loadingTextstring"Loading..."Text shown while loading.
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "glass" | "link""secondary"Trigger button variant — override for different surface contexts.
renderOption(option, isSelected) => ReactNode—Custom option renderer.
resolveLabel(value: string) => string | null—Resolve a value to a display label (for selected items not in current options).
align"start" | "center" | "end""start"Popover alignment.
portalContainerHTMLElement | null—DOM element to portal the popover into (useful inside Dialog).
PreviousCollapsibleNextCommand

On This Page

  • Installation
  • Usage
  • Examples
  • With Status
  • With Icon
  • With User
  • With Groups
  • Multiple
  • API Reference
ReactDark