saturation/uisaturation/ui
DocsComponentsBlocksPagesEmails
GitHub

Sections

IntroductionComponentsInstallationMCPThemingDesign

Components

Components

General

AvatarBadgeButtonKbdProgressSeparatorSkeletonSpin ResolveSpinnerSync ButtonTypography

Forms & Inputs

Address LookupCalendar PickerCheckboxComboboxDate PickerEmoji PickerFavicon SearchFieldInputInput GroupInput OTPRadio GroupSelectSliderSwitchTextareaToggleToggle Group

Data Display

AccordionAlertCardChartComparison SliderCredit CardData TableEmptyItemSaturation Credit CardTableTree

Navigation

BreadcrumbCommandMenubarNavigation MenuPaginationTabs

Overlays

CollapsibleContext MenuDialogDropdown MenuSheet

Layout

Button GroupFont ProviderWizard Split Layout

Feedback

Sonner

Animation & Effects

Animated GroupAnimated ListAnimated NumberBeamBlur FadeBorder TrailGlow EffectLiquid MetalLoading StateParallaxPixelProgressive BlurRippleSpotlightText EffectText Shimmer

Productivity

Agent ChatAI Chat InputCoding AgentFiltersFull CalendarKanbanNovel Editor
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 @saturation-ui/combobox

Tailwind v4 — Source Scanning

The public shadcn registry installs component source into your project. 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