Copy this complete component into a page file. Edit and run it in the Playground.
Loading editor…
Editable text field with a filtered suggestion list. Free typing is allowed; matching options appear in a portaled list anchored to the field.
document.body with viewport-aware placement (flips above when needed) and matches the field width.| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled input text. |
onChange | (value: string) => void | — | Called on typing or option select. |
options | { label: string; value: string }[] | — | Suggestion entries. |
placeholder | string | — | Empty-state hint. |
role="combobox" with aria-expanded, aria-controls, and aria-activedescendant.listbox with selectable option roles.