Autocomplete
Type-to-filter combobox built on the same ZyraOption/token foundation as ZyraSelect, with a text input trigger instead of a button.
API
All inputs and configuration options for zyra-autocomplete.
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | 'Search…' | Placeholder text for the input |
size | 'sm' | 'md' | 'lg' | 'md' | Height and font scale |
appearance | 'outline' | 'filled' | 'underline' | 'outline' | Visual style of the input |
noResultsLabel | string | 'No results' | Message shown in the panel when the query matches nothing |
Accessibility
Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.
- Input uses role="combobox" with aria-autocomplete="list" and aria-expanded
- Panel uses role="listbox"; aria-activedescendant tracks the highlighted match
- Arrow keys move the highlight; Enter selects; Escape closes; Tab dismisses