sigilUI

Combobox

Search a list of options and select a value.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Combobox } from "@sigil-ui/components";

Usage

<Combobox placeholder="Select framework..." options={[{ value: "next", label: "Next.js" }, { value: "remix", label: "Remix" }, { value: "astro", label: "Astro" }]} />

Props

PropTypeDefaultDescription
options (required)ComboboxOption[]—Options configuration.
valuestring—The current controlled value.
defaultValuestring—Initial value when the component manages its own state.
onValueChange(value: string) => void—Called when the user changes the value.
placeholderstring—Hint shown before a value is entered.
searchPlaceholderstring—Search Placeholder configuration.
emptyTextstring—Empty Text configuration.
classNamestring—Additional classes merged with the component styles.

Token integration

CSS VariablePurpose
--s-radius-mdRadius md
--s-border-styleBorder style
--s-backgroundBackground
--s-borderBorder
--s-duration-fastDuration fast
--s-ringRing
--s-primaryPrimary
--s-text-mutedText muted
--s-surfaceSurface
--s-shadow-mdShadow md
--s-radius-smRadius sm
--s-textText