structyl

Autocomplete

stable

MUI-style alias around the combobox pattern.

Basic usage

Examples

Searchable options

Autocomplete is the styled Combobox pattern with input, popup and option parts.

Grouped with a label

Wrap the input with your own label and helper text when used inside forms.

Type to filter available options.

Combobox slots

Autocomplete exposes the underlying combobox root, input, content, group, empty and item slots.

Features

  • Search input.
  • Option popup.

Installation

bash
pnpm dlx structyl add autocomplete

API Reference

Autocomplete.Root

Combobox root; accepts controlled/uncontrolled combobox props.

PropTypeDefault
classNamestring

Additional Tailwind classes merged with the component defaults.

Autocomplete.Input

Search input.

PropTypeDefault
placeholderstring

Input placeholder.

classNamestring

Additional Tailwind classes merged with the component defaults.

Autocomplete.Content

Popup content.

PropTypeDefault
classNamestring

Additional Tailwind classes merged with the component defaults.

Autocomplete.Item

Selectable option.

PropTypeDefault
valuestring

Option value.

classNamestring

Additional Tailwind classes merged with the component defaults.

Autocomplete | structyl