Pick a prompt.
- Add the registry
- Add suggestion
Usage
onSelect receives the suggestion's value, which is also its label unless you pass children.
Return a promise from onSelect to keep the suggestion pending until the promise settles. Your own
onClick runs first, and calling event.preventDefault() in it skips onSelect. When a row of
suggestions doesn't fit, it scrolls horizontally and fades at the edges where there's more to
scroll.
Composition
Examples
Wrapped
wrap wraps the suggestions onto as many lines as they need.
Props
Base UI's styling (opens in a new tab) and composition (opens in a new tab) guides say more about className, style and render.