Autocomplete
stableMUI-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 autocompleteAPI Reference
Autocomplete.Root
Combobox root; accepts controlled/uncontrolled combobox props.
| Prop | Type | Default |
|---|---|---|
| className | stringAdditional Tailwind classes merged with the component defaults. | — |
Autocomplete.Input
Search input.
| Prop | Type | Default |
|---|---|---|
| placeholder | stringInput placeholder. | — |
| className | stringAdditional Tailwind classes merged with the component defaults. | — |
Autocomplete.Content
Popup content.
| Prop | Type | Default |
|---|---|---|
| className | stringAdditional Tailwind classes merged with the component defaults. | — |
Autocomplete.Item
Selectable option.
| Prop | Type | Default |
|---|---|---|
| value | stringOption value. | — |
| className | stringAdditional Tailwind classes merged with the component defaults. | — |