Skip to content
ghostui

Preview

Design guidance

Autocomplete renders the standard Input control at its default 32 px height. Its InputGroup uses the canonical field boundary. Place Clear or Trigger in InputGroup.Addon for the same inset ghost icon buttons used by Combobox.

The popup matches the input width within the available screen space. Compose Field.Root and Field.Label for shared label spacing. Group labels use the same --menu-label-* theme roles as Select and Combobox. Compose Separator between groups.

Use Autocomplete when typing filters a list and the user may commit a free-form value. Use Combobox when the value must come from a bounded set.

Installation

Install the local ghost-kit source bundle while the registry runs at localhost:3110. It contains this component and its source dependencies. Prepare the local registry first so token dependencies also resolve locally.

Install

Basic usage

Structure

Examples

Load movie options asynchronously while typing. The specimen shows loading, empty, error and retry states, and ignores responses from older requests.

Inline autocomplete

Autofill the input with the highlighted item while navigating with arrow keys by using mode="both" and inline.

Apple
Apricot
Banana
Blueberry
Cherry
Grape
Mango
Orange
Peach
Pear
Pineapple
Strawberry

Grouped

Organize related pantry options with Group, GroupLabel, and Collection.

Fuzzy matching

Find a teammate with a subsequence query such as “mp”, even when the query does not match consecutive text.

Limit results

Limit the visible result count and guide users to refine their query with Status.

Auto highlight

Highlight the first matching destination as the user types and report the active option in text.

Command palette

Filter commands and run a local visible action when an item is clicked or accepted with Enter.

Grid layout

Display team options in rows with grid and Row; Arrow keys move across the resulting grid.

Virtualized

Window a 240-item list so only the visible rows mount. Scroll the popup to render a different window.

Memoized items

Use React.memo for lists up to roughly 1,000 items. Memoization reduces updates but does not replace windowing for larger lists.

API reference

For inherited behavior and additional part properties, see the Base UI Autocomplete API.