Combobox
Autocomplete input with a list of suggestions.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products}> <ComboboxInput placeholder="Select a product" /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Composition
Section titled “Composition”Simple
Section titled “Simple”A single-line input and a flat list (see Basic).
Combobox├── ComboboxInput└── ComboboxContent ├── ComboboxEmpty └── ComboboxList ├── ComboboxItem └── ComboboxItemWith chips
Section titled “With chips”Multi-select with multiple, chips, and a chips input (see
Multiple).
Combobox├── ComboboxChips│ ├── ComboboxValue│ │ └── ComboboxChip│ └── ComboboxChipsInput└── ComboboxContent ├── ComboboxEmpty └── ComboboxList ├── ComboboxItem └── ComboboxItemWith groups and collection
Section titled “With groups and collection”Nested items per group using ComboboxCollection inside each ComboboxGroup,
with a separator between groups (see Groups).
Combobox├── ComboboxInput└── ComboboxContent ├── ComboboxEmpty └── ComboboxList ├── ComboboxGroup │ ├── ComboboxLabel │ └── ComboboxCollection │ ├── ComboboxItem │ └── ComboboxItem ├── ComboboxSeparator └── ComboboxGroup ├── ComboboxLabel └── ComboboxCollection ├── ComboboxItem └── ComboboxItemA simple combobox with a list of products.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products}> <ComboboxInput placeholder="Select a product" /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Multiple
Section titled “Multiple”A combobox with multiple selection using multiple and ComboboxChips.
Code
import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxContent, ComboboxEmpty, ComboboxItem, ComboboxList, ComboboxValue,} from "@falcon/ui-kit";import { useRef } from "react";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { const anchor = useRef<HTMLDivElement | null>(null);
return ( <Combobox multiple autoHighlight items={products} defaultValue={[products[0]]} > <ComboboxChips ref={anchor} className="tw:w-full tw:max-w-xs"> <ComboboxValue> {(values) => ( <> {values.map((value: string) => ( <ComboboxChip key={value}>{value}</ComboboxChip> ))} <ComboboxChipsInput /> </> )} </ComboboxValue> </ComboboxChips> <ComboboxContent anchor={anchor}> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Clear Button
Section titled “Clear Button”Use the showClear prop to show a clear button.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products} defaultValue={products[0]}> <ComboboxInput placeholder="Select a product" showClear /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Groups
Section titled “Groups”Use ComboboxGroup and ComboboxSeparator to group items.
Code
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator,} from "@falcon/ui-kit";
const timezones = [ { value: "Americas", items: [ "(GMT-5) New York", "(GMT-8) Los Angeles", "(GMT-6) Chicago", "(GMT-5) Toronto", "(GMT-8) Vancouver", "(GMT-3) São Paulo", ], }, { value: "Europe", items: [ "(GMT+0) London", "(GMT+1) Paris", "(GMT+1) Berlin", "(GMT+1) Rome", "(GMT+1) Madrid", "(GMT+1) Amsterdam", ], }, { value: "Asia/Pacific", items: [ "(GMT+9) Tokyo", "(GMT+8) Shanghai", "(GMT+8) Singapore", "(GMT+4) Dubai", "(GMT+11) Sydney", "(GMT+9) Seoul", ], },] as const;
export function Example() { return ( <Combobox items={timezones}> <ComboboxInput placeholder="Select a timezone" /> <ComboboxContent> <ComboboxEmpty>No timezones found.</ComboboxEmpty> <ComboboxList> {(group, index) => ( <ComboboxGroup key={group.value} items={group.items}> <ComboboxLabel>{group.value}</ComboboxLabel> <ComboboxCollection> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxCollection> {index < timezones.length - 1 && <ComboboxSeparator />} </ComboboxGroup> )} </ComboboxList> </ComboboxContent> </Combobox> );}Custom Items
Section titled “Custom Items”You can render a custom component inside ComboboxItem.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, Item, ItemContent, ItemDescription, ItemTitle,} from "@falcon/ui-kit";
const countries = [ { code: "", value: "", continent: "", label: "Select country" }, { code: "ar", value: "argentina", label: "Argentina", continent: "South America", }, { code: "au", value: "australia", label: "Australia", continent: "Oceania" }, { code: "br", value: "brazil", label: "Brazil", continent: "South America" }, { code: "ca", value: "canada", label: "Canada", continent: "North America" }, { code: "cn", value: "china", label: "China", continent: "Asia" }, { code: "co", value: "colombia", label: "Colombia", continent: "South America", }, { code: "eg", value: "egypt", label: "Egypt", continent: "Africa" }, { code: "fr", value: "france", label: "France", continent: "Europe" }, { code: "de", value: "germany", label: "Germany", continent: "Europe" }, { code: "it", value: "italy", label: "Italy", continent: "Europe" }, { code: "jp", value: "japan", label: "Japan", continent: "Asia" }, { code: "ke", value: "kenya", label: "Kenya", continent: "Africa" }, { code: "mx", value: "mexico", label: "Mexico", continent: "North America" }, { code: "nz", value: "new-zealand", label: "New Zealand", continent: "Oceania", }, { code: "ng", value: "nigeria", label: "Nigeria", continent: "Africa" }, { code: "za", value: "south-africa", label: "South Africa", continent: "Africa", }, { code: "kr", value: "south-korea", label: "South Korea", continent: "Asia" }, { code: "gb", value: "united-kingdom", label: "United Kingdom", continent: "Europe", }, { code: "us", value: "united-states", label: "United States", continent: "North America", },];
export function Example() { return ( <Combobox items={countries.filter((country) => country.code !== "")} itemToStringValue={(country: (typeof countries)[number]) => country.label} > <ComboboxInput placeholder="Search countries..." /> <ComboboxContent> <ComboboxEmpty>No countries found.</ComboboxEmpty> <ComboboxList> {(country) => ( <ComboboxItem key={country.code} value={country}> <Item size="xs" className="tw:p-0"> <ItemContent> <ItemTitle className="tw:whitespace-nowrap"> {country.label} </ItemTitle> <ItemDescription> {country.continent} ({country.code}) </ItemDescription> </ItemContent> </Item> </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Invalid
Section titled “Invalid”Use the aria-invalid prop to make the combobox invalid.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products}> <ComboboxInput placeholder="Select a product" aria-invalid="true" /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Disabled
Section titled “Disabled”Use the disabled prop to disable the combobox.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products}> <ComboboxInput placeholder="Select a product" disabled /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}Auto Highlight
Section titled “Auto Highlight”Use the autoHighlight prop to automatically highlight the first item on
filter.
Code
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList,} from "@falcon/ui-kit";
const products = [ "Corn seed", "Soybean seed", "Starter fertilizer", "Potash", "Urea",] as const;
export function Example() { return ( <Combobox items={products} autoHighlight> <ComboboxInput placeholder="Select a product" /> <ComboboxContent> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> );}You can trigger the combobox from a button or any other component by using the
render prop. Move the ComboboxInput inside the ComboboxContent.
Code
import { Button, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, ComboboxValue,} from "@falcon/ui-kit";
const countries = [ { code: "", value: "", continent: "", label: "Select country" }, { code: "ar", value: "argentina", label: "Argentina", continent: "South America", }, { code: "au", value: "australia", label: "Australia", continent: "Oceania" }, { code: "br", value: "brazil", label: "Brazil", continent: "South America" }, { code: "ca", value: "canada", label: "Canada", continent: "North America" }, { code: "cn", value: "china", label: "China", continent: "Asia" }, { code: "co", value: "colombia", label: "Colombia", continent: "South America", }, { code: "eg", value: "egypt", label: "Egypt", continent: "Africa" }, { code: "fr", value: "france", label: "France", continent: "Europe" }, { code: "de", value: "germany", label: "Germany", continent: "Europe" }, { code: "it", value: "italy", label: "Italy", continent: "Europe" }, { code: "jp", value: "japan", label: "Japan", continent: "Asia" }, { code: "ke", value: "kenya", label: "Kenya", continent: "Africa" }, { code: "mx", value: "mexico", label: "Mexico", continent: "North America" }, { code: "nz", value: "new-zealand", label: "New Zealand", continent: "Oceania", }, { code: "ng", value: "nigeria", label: "Nigeria", continent: "Africa" }, { code: "za", value: "south-africa", label: "South Africa", continent: "Africa", }, { code: "kr", value: "south-korea", label: "South Korea", continent: "Asia" }, { code: "gb", value: "united-kingdom", label: "United Kingdom", continent: "Europe", }, { code: "us", value: "united-states", label: "United States", continent: "North America", },];
export function Example() { return ( <> <Combobox items={countries} defaultValue={countries[0]}> <ComboboxTrigger render={ <Button variant="outline" className="tw:w-64 tw:justify-between tw:font-normal" /> } > <ComboboxValue /> </ComboboxTrigger> <ComboboxContent> <ComboboxInput showTrigger={false} placeholder="Search" /> <ComboboxEmpty>No items found.</ComboboxEmpty> <ComboboxList> {(item) => ( <ComboboxItem key={item.code} value={item}> {item.label} </ComboboxItem> )} </ComboboxList> </ComboboxContent> </Combobox> </> );}Input Group
Section titled “Input Group”You can add an addon to the combobox by using the InputGroupAddon component
inside the ComboboxInput.
Code
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, GlobeIcon, InputGroupAddon,} from "@falcon/ui-kit";
const timezones = [ { value: "Americas", items: [ "(GMT-5) New York", "(GMT-8) Los Angeles", "(GMT-6) Chicago", "(GMT-5) Toronto", "(GMT-8) Vancouver", "(GMT-3) São Paulo", ], }, { value: "Europe", items: [ "(GMT+0) London", "(GMT+1) Paris", "(GMT+1) Berlin", "(GMT+1) Rome", "(GMT+1) Madrid", "(GMT+1) Amsterdam", ], }, { value: "Asia/Pacific", items: [ "(GMT+9) Tokyo", "(GMT+8) Shanghai", "(GMT+8) Singapore", "(GMT+4) Dubai", "(GMT+11) Sydney", "(GMT+9) Seoul", ], },] as const;
export function Example() { return ( <Combobox items={timezones}> <ComboboxInput placeholder="Select a timezone"> <InputGroupAddon> <GlobeIcon /> </InputGroupAddon> </ComboboxInput> <ComboboxContent alignOffset={-28} className="tw:w-60"> <ComboboxEmpty>No timezones found.</ComboboxEmpty> <ComboboxList> {(group) => ( <ComboboxGroup key={group.value} items={group.items}> <ComboboxLabel>{group.value}</ComboboxLabel> <ComboboxCollection> {(item) => ( <ComboboxItem key={item} value={item}> {item} </ComboboxItem> )} </ComboboxCollection> </ComboboxGroup> )} </ComboboxList> </ComboboxContent> </Combobox> );}Combobox
Section titled “Combobox”Provides shared state for a filterable input and predefined selectable items
without rendering an element. Accepts supported root props; items may be
objects with extra fields, and { value, label } items use label for
display and value for form submission. There is no imperative actions API;
control the popup with open/onOpenChange.
autoComplete
Section titled “autoComplete”autoComplete?: stringProvides a hint to the browser for autofill.
autoHighlight
Section titled “autoHighlight”autoHighlight?: booleanWhether the first matching item is highlighted automatically while filtering.
children
Section titled “children”children?: React.ReactNodedefaultInputValue
Section titled “defaultInputValue”defaultInputValue?: string | number | readonly string[]The uncontrolled input value when the combobox is initially rendered.
defaultOpen
Section titled “defaultOpen”defaultOpen?: booleanWhether the popup is initially open. Use open to control the popup.
defaultValue
Section titled “defaultValue”defaultValue?: ComboboxValueType<Value, Multiple> | nullThe uncontrolled selected value when the combobox is initially rendered.
Use value to control it.
disabled
Section titled “disabled”disabled?: booleanWhether the component should ignore user interaction.
filter
Section titled “filter”filter?: ((itemValue: Value, query: string, itemToString?: ((itemValue: Value) => string) | undefined) => boolean) | nullFilters items against the input query. Set to null to disable filtering.
filteredItems
Section titled “filteredItems”filteredItems?: readonly any[] | readonly Group<any>[]Items to render instead of internally filtered items.
form?: stringIdentifies the form that owns the internal input.
grid?: booleanWhether list items are presented in a grid layout for arrow-key navigation.
highlightItemOnHover
Section titled “highlightItemOnHover”highlightItemOnHover?: booleanWhether moving the pointer over an item highlights it.
id?: stringThe ID applied to the component.
inline
Section titled “inline”inline?: booleanWhether the list is rendered inline rather than in the component popup.
inputRef
Section titled “inputRef”inputRef?: React.Ref<HTMLInputElement>A ref to the hidden input element used for form submission.
inputValue
Section titled “inputValue”inputValue?: string | number | readonly string[]The input value. Use when controlling the filter query.
isItemEqualToValue
Section titled “isItemEqualToValue”isItemEqualToValue?: ((itemValue: Value, value: Value) => boolean)Compares an item value with the selected value. Defaults to Object.is.
items?: readonly any[] | readonly Group<any>[]Items displayed in the list, optionally grouped.
itemToStringLabel
Section titled “itemToStringLabel”itemToStringLabel?: ((itemValue: Value) => string)Converts object item values to the label displayed in the input.
itemToStringValue
Section titled “itemToStringValue”itemToStringValue?: ((itemValue: Value) => string)Converts object item values to the form value.
limit?: numberThe maximum number of items to display.
locale
Section titled “locale”locale?: Intl.LocalesArgumentThe locale used for string comparison.
loopFocus
Section titled “loopFocus”loopFocus?: booleanWhether arrow-key navigation wraps between the input and list boundaries.
modal?: booleanWhether the open popup blocks outside interaction.
multiple
Section titled “multiple”multiple?: MultipleWhether multiple items can be selected.
name?: stringIdentifies the field when a form is submitted.
onInputValueChange
Section titled “onInputValueChange”onInputValueChange?: ((inputValue: string, eventDetails: ComboboxPrimitive.Root.ChangeEventDetails) => void)Called when the input value changes.
onItemHighlighted
Section titled “onItemHighlighted”onItemHighlighted?: ((highlightedValue: Value | undefined, eventDetails: ComboboxPrimitive.Root.HighlightEventDetails) => void)Called when an item is highlighted or unhighlighted.
onOpenChange
Section titled “onOpenChange”onOpenChange?: ((open: boolean, eventDetails: ComboboxPrimitive.Root.ChangeEventDetails) => void)Called when the popup opens or closes.
onOpenChangeComplete
Section titled “onOpenChangeComplete”onOpenChangeComplete?: ((open: boolean) => void)Called after opening or closing animations finish.
onValueChange
Section titled “onValueChange”onValueChange?: ((value: ComboboxValueType<Value, Multiple> | (Multiple extends true ? never : null), eventDetails: ComboboxPrimitive.Root.ChangeEventDetails) => void)Called when the selected value changes.
open?: booleanWhether the popup is open. Use when controlling the popup.
openOnInputClick
Section titled “openOnInputClick”openOnInputClick?: booleanWhether clicking the input opens the popup.
readOnly
Section titled “readOnly”readOnly?: booleanWhether the user can change the selected value.
required
Section titled “required”required?: booleanWhether choosing a value is required before form submission.
value?: ComboboxValueType<Value, Multiple> | nullThe selected value. Use when controlling the combobox.
virtualized
Section titled “virtualized”virtualized?: booleanWhether the list items are externally virtualized.
ComboboxChip
Section titled “ComboboxChip”Renders a selected multiselect value in a <div>. render can replace the
element.
className
Section titled “className”className?: stringCSS class applied to the element.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxChipState>Replaces the rendered chip or composes it with another component.
showRemove
Section titled “showRemove”showRemove?: boolean = trueWhether to show the remove button.
style?: React.CSSProperties | ((state: ComboboxChipState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxChips
Section titled “ComboboxChips”Renders a <div> container for multiselect chips. render can replace the
element.
className
Section titled “className”className?: stringCSS class applied to the element.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxChipsState>Replaces the rendered chip container or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxChipsState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxChipsInput
Section titled “ComboboxChipsInput”Renders a multiselect filter <input>. render can replace the element.
className
Section titled “className”className?: stringCSS class applied to the element.
disabled
Section titled “disabled”disabled?: booleanWhether the component should ignore user interaction.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxInputState>Replaces the rendered input or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxInputState) => React.CSSProperties | undefined)Style applied to the input, or a function that returns a style from component state.
ComboboxCollection
Section titled “ComboboxCollection”Renders filtered items without adding an element.
children
Section titled “children”children: (item: any, index: number) => React.ReactNodeRenders each filtered item. Use a function child on ComboboxList for flat
lists.
ComboboxContent
Section titled “ComboboxContent”Renders a portalled, positioned <div> popup. render can replace the popup
element.
align?: Align = "start"How the popup is aligned relative to its anchor.
alignOffset
Section titled “alignOffset”alignOffset?: number | OffsetFunction = 0Additional offset along the alignment axis in pixels.
anchor
Section titled “anchor”anchor?: Element | VirtualElement | React.RefObject<Element | null> | (() => Element | VirtualElement | null) | nullThe element the popup is positioned against.
className
Section titled “className”className?: stringCSS class applied to the popup.
finalFocus
Section titled “finalFocus”finalFocus?: boolean | React.RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null)Determines the element to focus when the popup closes.
initialFocus
Section titled “initialFocus”initialFocus?: boolean | React.RefObject<HTMLElement | null> | ((openType: InteractionType) => void | boolean | HTMLElement | null)Determines the element to focus when the popup opens.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxPopupState>Replaces the rendered popup or composes it with another component.
side?: Side = "bottom"Which side of the anchor to place the popup against.
sideOffset
Section titled “sideOffset”sideOffset?: number | OffsetFunction = 6Distance between the anchor and popup in pixels.
style?: React.CSSProperties | ((state: ComboboxPopupState) => React.CSSProperties | undefined)Style applied to the popup, or a function that returns a style from component state.
ComboboxEmpty
Section titled “ComboboxEmpty”Renders an empty-state announcement in a <div>. render can replace the
element.
className
Section titled “className”className?: stringCSS class applied to the element.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxEmptyState>Replaces the rendered empty state or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxEmptyState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxGroup
Section titled “ComboboxGroup”Renders a <div> that groups related items and their label. render can
replace the element.
className
Section titled “className”className?: stringCSS class applied to the element.
items?: readonly any[]Items rendered within this group by child ComboboxCollection components.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxGroupState>Replaces the rendered group or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxGroupState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxInput
Section titled “ComboboxInput”Renders an input-group wrapper around an <input> with optional clear and
trigger controls. render can replace the input element.
className
Section titled “className”className?: stringCSS class applied to the input group.
disabled
Section titled “disabled”disabled?: booleanWhether the component should ignore user interaction.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxInputState>Replaces the rendered input or composes it with another component.
showClear
Section titled “showClear”showClear?: booleanWhether to show a button that clears the selected value.
showTrigger
Section titled “showTrigger”showTrigger?: boolean = trueWhether to show a button that opens the popup.
style?: React.CSSProperties | ((state: ComboboxInputState) => React.CSSProperties | undefined)Style applied to the input, or a function that returns a style from component state.
ComboboxItem
Section titled “ComboboxItem”Renders a selectable <div> item. render can replace the element.
children
Section titled “children”children?: React.ReactNodeThe item contents.
className
Section titled “className”className?: stringCSS class applied to the element.
disabled
Section titled “disabled”disabled?: booleanWhether the component should ignore user interaction.
index?: numberThe item index, used to avoid calculating it from the DOM.
nativeButton
Section titled “nativeButton”nativeButton?: booleanWhether a custom render element is a native button.
onClick
Section titled “onClick”onClick?: ((event: BaseUIEvent<React.MouseEvent<HTMLDivElement, MouseEvent>>) => void)Called when the item is selected with the pointer or keyboard.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxItemState>Replaces the rendered item or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxItemState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
value?: anyA unique value that identifies this item.
ComboboxLabel
Section titled “ComboboxLabel”Renders a <div> label associated with its group. render can replace the
element.
className
Section titled “className”className?: stringCSS class applied to the element.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxGroupLabelState>Replaces the rendered label or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxGroupLabelState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxList
Section titled “ComboboxList”Renders the item list in a <div>. render can replace the element.
children
Section titled “children”children?: React.ReactNode | ((item: any, index: number) => React.ReactNode)List content, or a function that renders each item.
className
Section titled “className”className?: stringCSS class applied to the element.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxListState>Replaces the rendered list or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxListState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxSeparator
Section titled “ComboboxSeparator”Renders an accessible <div> separator. render can replace the element.
className
Section titled “className”className?: stringCSS class applied to the element.
orientation
Section titled “orientation”orientation?: OrientationThe separator orientation.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SeparatorState>Replaces the rendered separator or composes it with another component.
style?: React.CSSProperties | ((state: SeparatorState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxTrigger
Section titled “ComboboxTrigger”Opens the popup. Renders a <button> and render can replace the element.
className
Section titled “className”className?: stringCSS class applied to the element.
disabled
Section titled “disabled”disabled?: booleanWhether the component should ignore user interaction.
nativeButton
Section titled “nativeButton”nativeButton?: booleanWhether a custom render element is a native button.
render
Section titled “render”render?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxTriggerState>Replaces the rendered element or composes it with another component.
style?: React.CSSProperties | ((state: ComboboxTriggerState) => React.CSSProperties | undefined)Style applied to the element, or a function that returns a style from component state.
ComboboxValue
Section titled “ComboboxValue”Renders the selected value without adding an element.
children
Section titled “children”children?: React.ReactNode | ((selectedValue: any) => React.ReactNode)The current selected value, or a function that renders it.
placeholder
Section titled “placeholder”placeholder?: React.ReactNodeDisplayed when no value is selected.