Forms
Combobox
Combines a text input with an anchored popup list for filtering and selecting values.
Usage
Anatomy
The parts and how they nest, taken from the preview above.
Installation
Install the Mizen package and import the required parts. These examples use Mizen surfaces and Tabler icons.
Single Selection
Provide items and render each option through ComboboxList. The root supports controlled and uncontrolled selection.
Multiple Selection
Set multiple and render selected values as chips. Use ComboboxChipsInput for search and name each removal action.
Examples
Disabled
Prevents editing and opening the popup.
Small Size
Uses the compact input size.
Large Size
Uses the large input size.
With Label
Provide items and a visible field label; the empty state explains when filtering finds no option.
Auto Highlight
Highlights the first matching item for keyboard selection.
With Clear Button
Clears the selected value without opening the popup.
With Groups
Filters grouped options and preserves their headings.
With Multiple Selection
Choose the tags that describe this project.
With Start Addon
Places a search icon at the start of the input.
With Start Addon - Multiple
Places a search icon before removable selection chips.
With Input Inside Popup
Opens a searchable list from an outline button.
With Select-like Button
Uses SelectButton as the ComboboxTrigger render target.
Form Integration
Submits the selected value through native FormData with required validation.
Form Integration - Multiple
Submits repeated native form entries for multiple selections.
Primitive Values from Objects
Uses createComboboxItems to display names while storing stable identifiers.
Keyboard-accessible actions
The clear and trigger buttons participate in keyboard navigation.
Read-only framework
Read-only controls allow selection and copying without edits.
Required framework
Use an invalid state with a nearby explanation of the error.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Use filtering when the option set is hard to scan. Keep option labels distinct and explain empty results. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Select for a short fixed list. Remote search, request cancellation, and result loading belong to the application. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
Combobox
Owns selection, search, popup state, and native form values.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Provides the searchable collection. |
| | false | Selects several values and submits repeated form entries. |
| | — | Controls selection or supplies the initial uncontrolled selection. |
| | — | Receives selection changes. |
| | false | Controls the popup or supplies its initial open state. |
| | — | Receives popup state changes. |
| | — | Controls search text or supplies its initial value. |
| | — | Receives search text changes. |
| | false | Highlights the first matching option. |
| | — | Overrides item filtering; null disables built-in filtering. |
| | — | Converts selected objects into display labels and submitted form values. |
| | — | Compares objects when references differ. |
| | — | Configures native form submission, validation, and interaction. |
| | — | Supports the complete Base UI root API. |
createComboboxItems
Builds a typed collection from objects while selecting stable primitive identifiers.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Source objects; keep static collections outside components. |
| | — | Derives search labels and stored values. |
ComboboxInput
Single-selection input with optional leading content and trailing actions.
| Prop | Type | Default | Description |
|---|---|---|---|
| | "default" | Named Mizen size or native input size. |
| | — | Leading icon or content. |
| | true / false | Shows the trigger or selected-value clear button. |
| | — | Configures internal actions, including accessible labels and tabIndex. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxPopup
Anchored popup rendered through a portal; uses the chips container for multiple selection.
| Prop | Type | Default | Description |
|---|---|---|---|
| | "bottom" / "start" | Chooses placement. |
| | 4 / Base UI default | Offsets the popup from its anchor. |
| | — | Overrides the positioning anchor. |
| | — | Configures container and keepMounted. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxList
Scrollable item collection. Children may be nodes or an item-rendering function.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Renders filtered items from the root or current group. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxItem
Selectable option with a selected-state checkmark.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | The selected value. |
| | false | Excludes the option from selection. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxEmpty
Displays content when filtering leaves no matching items.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxGroup
Groups related items without adding another selection controller.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Provides this group’s collection. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxGroupLabel
Visible heading for a group of options.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxCollection
Renders items from the current root or group collection.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Creates each item using the current filtered collection. |
ComboboxChips
Container for selected values in multiple mode; also anchors the popup.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Leading content before the selected chips. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxChipsInput
Minimal input for multiple selection; does not add its own trigger or clear button.
| Prop | Type | Default | Description |
|---|---|---|---|
| | "default" | Named Mizen size or native input size. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxChip
One selected value with an integrated removal action.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Configures the removal button; use a value-specific aria-label. |
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxValue
Reads the current selection for custom display or chip rendering.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Renders the current selection. |
| | — | Displays when no value is selected. |
ComboboxTrigger
Opens the popup. Use render with Button or SelectButton for a standalone trigger.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxClear
Clears the selected value; renders only when a value exists.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxChipRemove
Removes the current chip through Base UI selection behavior.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxSeparator
Separates option groups.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxRow
Arranges options in a navigable row.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
ComboboxStatus
Announces collection updates to assistive technology.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Changes the host element or receives its ref; internal slot names remain protected. |
| | — | Forwards native attributes, events, and the corresponding Base UI props. |
useComboboxFilter
Creates locale-aware matching helpers for custom item filtering.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Controls case, accent, and locale matching. |
| | — | Matching functions for custom filters. |
ComboboxPrimitive
Exports the installed Base UI Combobox namespace for advanced composition.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Includes native parts, createItems, and useFilter. |
ComboboxContext
Provides the wrapper’s chip anchor and selection mode.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Exposes the shared multiple-selection anchor. |
SelectButton
Select-style button that works outside Select context. Import from @mizen-labs/ui/select.
| Prop | Type | Default | Description |
|---|---|---|---|
| | "default" | Reuses Mizen Select sizing. |
| | — | Changes the host element using Base UI useRender. |
| | — | Accepts native button props and ref. |