Skip to content

Combobox

Type to filter a list. 1 pick, or chips.

Installation

Install Combobox from the Fluid Effect UI registry.

Playground

Basic

With icons

Multiple selection

Create from the query

Hide picked rows

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
PropTypeDefaultDescription
keystring | 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.formstring | undefined—
props.filter"endsWith" | "startsWith" | "none" | "contains" | undefined—
props.idstring | undefinedoptions.key
props.disabledboolean | undefined—
props.valuestring | readonly string[] | null | undefined—
props.openbooleanRequired
props.modalboolean | undefined—
props.requiredboolean | undefined—
props.dir"ltr" | "rtl" | undefined—
props.anchor
Show type
string | { 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 type
readonly { readonly label: string; readonly value: string; readonly disabled?: boolean | undefined; readonly group?: string | undefined; readonly row?: number | undefined; }[]
Required
props.namestring | undefined—
props.readOnlyboolean | undefined—
props.placeholderstring | undefined'Search…'
props.localestring | undefined—
props.dismissLabelstring | undefined—
props.align"end" | "start" | "center" | undefined—
props.sideOffsetnumber | undefined—
props.alignOffsetnumber | 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 type
number | { readonly bottom?: number | undefined; readonly left?: number | undefined; readonly right?: number | undefined; readonly top?: number | undefined; } | undefined
—
props.stickyboolean | undefined—
props.arrowPaddingnumber | undefined—
props.positionMethod"fixed" | "absolute" | undefined—
props.disableAnchorTrackingboolean | undefined—
props.topLayerboolean | undefined—
props.multipleboolean | undefined—
props.autoCompletestring | undefined—
props.highlightItemOnHoverboolean | undefined—
props.finalFocusboolean | undefined—
props.holdExitboolean | undefined—
props.loopFocusboolean | undefined—
props.autoHighlightboolean | undefined—
props.inputValuestringRequired
props.filteredItems
Show type
readonly { readonly label: string; readonly value: string; readonly disabled?: boolean | undefined; readonly group?: string | undefined; readonly row?: number | undefined; }[] | undefined
—
props.limitnumber | undefined—
props.clearOnEscapeboolean | undefined—
props.openOnInputClickboolean | undefined—
props.removedLabelstring | undefined—
props.inputInPopupfalse—
props.inlinefalse—
props.gridfalse—
props.virtualizedfalse—
sizeSizeVariant'default'
shapeShapeVariant'rounded'
surfacenumber1
reducedMotion"user" | "always" | "never"'user'
classNamestring—
contentClassNamestring—
ariaLabelstringRequired
invalidboolean—
errorstring—
variant"borderless" | "bordered"—
clearableboolean—
emptyTextstring'No results found.'
leadingView.Content<Msg, R> | undefined—
renderIcon(item: ComboboxProps["items"][number]) => View.Content<Msg, R> | undefined—