ZBMui

Autocomplete

View markdown

An input that suggests options as you type.

Installation

components/ui/autocomplete.tsx

Usage

Examples

Sizes

Disabled

With label

Inline autocomplete

Controls how the autocomplete behaves with respect to list filtering and inline autocompletion.

  • list (default): items are dynamically filtered based on the input value. The input value does not change based on the active item.
  • both: items are dynamically filtered based on the input value, which will temporarily change based on the active item (inline autocompletion).
  • inline: items are static (not filtered), and the input value will temporarily change based on the active item (inline autocompletion).
  • none: items are static (not filtered), and the input value will not change based on the active item.

Auto highlight

Whether the first matching item is highlighted automatically.

  • true - Highlight after the user types and keep the highlight while the query changes.
  • always - Always highlight the first item.

With clear button

Pass showClear prop to the AutocompleteInput component to show a clear button.

With clear & trigger button

Pass showClear and showTrigger props to the AutocompleteInput component to show both buttons.

With start addon

Use the startAddon prop to add an icon or any other element before the input.

Grouped

Limit results

API Reference

Autocomplete Input props

Component type props
Prop
Type
Default
Expand prop details

Autocomplete Positioner props

Component type props
Prop
Type
Default
Expand prop details

Autocomplete Popup props

Component type props
Prop
Type
Default
Expand prop details

Autocomplete List props

Component type props
Prop
Type
Default
Expand prop details

ZBMui

Built by the ZBM.

© 2026 ZBM ui. All rights reserved.