Combobox
Type to filter a list. 1 pick, or chips.
Installation
Install Combobox from the Fluid Effect UI registry.
Playground
Button
Combobox
Basic
With icons
Multiple selection
Next.js
Astro
Create from the query
Button
Combobox
Hide picked rows
Button
Combobox
Variants
Long list
Error & disabled
Pick a framework to continue.
API Reference
Types come from the public API. A dash indicates no default is documented here.
Combobox props
Public source| Prop | Type | Default | Description |
|---|---|---|---|
key | string | undefined | '' | The child's identity among its parent's children of one component. The empty string by default. |
onEmit | Show type((events: ComboboxEvents) => NoInfer<Msg> | undefined) | { readonly RequestedClose: (event: { readonly _tag: "RequestedClose"; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "input-press" | "input-change" | "input-clear" | "clear-press" | "chip-remove-press"; }) => NoInfer<Msg> | undefined; readonly RequestedOpen: (event: { readonly _tag: "RequestedOpen"; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "input-press" | "input-change" | "input-clear" | "clear-press" | "chip-remove-press"; }) => NoInfer<Msg> | undefined; readonly Picked: (event: { readonly _tag: "Picked"; readonly value: string | readonly string[] | null; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "input-press" | "input-change" | "input-clear" | "clear-press" | "chip-remove-press"; }) => NoInfer<Msg> | undefined; readonly Settled: (event: { readonly _tag: "Settled"; readonly open: boolean; }) => NoInfer<Msg> | undefined; readonly Highlighted: (event: { readonly _tag: "Highlighted"; readonly value: string | null; readonly index: number; readonly reason: "none" | "keyboard" | "pointer"; }) => NoInfer<Msg> | undefined; readonly RequestedInputValue: (event: { readonly _tag: "RequestedInputValue"; readonly inputValue: string; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "input-press" | "input-change" | "input-clear" | "clear-press" | "chip-remove-press"; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.form | string | undefined | — | |
props.filter | "endsWith" | "startsWith" | "none" | "contains" | undefined | — | |
props.id | string | undefined | options.key | |
props.disabled | boolean | undefined | — | |
props.value | string | readonly string[] | null | undefined | — | |
props.open | boolean | Required | |
props.modal | boolean | undefined | — | |
props.required | boolean | undefined | — | |
props.dir | "ltr" | "rtl" | undefined | — | |
props.anchor | Show typestring | { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } | undefined | — | |
props.side | "bottom" | "left" | "right" | "top" | "inline-start" | "inline-end" | undefined | — | |
props.items | Show typereadonly { readonly label: string; readonly value: string; readonly disabled?: boolean | undefined; readonly group?: string | undefined; readonly row?: number | undefined; }[] | Required | |
props.name | string | undefined | — | |
props.readOnly | boolean | undefined | — | |
props.placeholder | string | undefined | 'Search…' | |
props.locale | string | undefined | — | |
props.dismissLabel | string | undefined | — | |
props.align | "end" | "start" | "center" | undefined | — | |
props.sideOffset | number | undefined | — | |
props.alignOffset | number | undefined | — | |
props.collisionAvoidance | Show type{ readonly side?: "shift" | "none" | "flip" | undefined; readonly align?: "shift" | "none" | "flip" | undefined; readonly fallbackAxisSide?: "end" | "start" | "none" | undefined; } | undefined | — | |
props.collisionBoundary | Show type"clipping-ancestors" | { readonly id: string; } | { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } | undefined | — | |
props.collisionPadding | Show typenumber | { readonly bottom?: number | undefined; readonly left?: number | undefined; readonly right?: number | undefined; readonly top?: number | undefined; } | undefined | — | |
props.sticky | boolean | undefined | — | |
props.arrowPadding | number | undefined | — | |
props.positionMethod | "fixed" | "absolute" | undefined | — | |
props.disableAnchorTracking | boolean | undefined | — | |
props.topLayer | boolean | undefined | — | |
props.multiple | boolean | undefined | — | |
props.autoComplete | string | undefined | — | |
props.highlightItemOnHover | boolean | undefined | — | |
props.finalFocus | boolean | undefined | — | |
props.holdExit | boolean | undefined | — | |
props.loopFocus | boolean | undefined | — | |
props.autoHighlight | boolean | undefined | — | |
props.inputValue | string | Required | |
props.filteredItems | Show typereadonly { readonly label: string; readonly value: string; readonly disabled?: boolean | undefined; readonly group?: string | undefined; readonly row?: number | undefined; }[] | undefined | — | |
props.limit | number | undefined | — | |
props.clearOnEscape | boolean | undefined | — | |
props.openOnInputClick | boolean | undefined | — | |
props.removedLabel | string | undefined | — | |
props.inputInPopup | false | — | |
props.inline | false | — | |
props.grid | false | — | |
props.virtualized | false | — | |
size | SizeVariant | 'default' | |
shape | ShapeVariant | 'rounded' | |
surface | number | 1 | |
reducedMotion | "user" | "always" | "never" | 'user' | |
className | string | — | |
contentClassName | string | — | |
ariaLabel | string | Required | |
invalid | boolean | — | |
error | string | — | |
variant | "borderless" | "bordered" | — | |
clearable | boolean | — | |
emptyText | string | 'No results found.' | |
leading | View.Content<Msg, R> | undefined | — | |
renderIcon | (item: ComboboxProps["items"][number]) => View.Content<Msg, R> | undefined | — |