Combobox
Grouped Sections
A combobox with sections: group headings label the rows, empty groups disappear while filtering, and the arrow keys step straight past the headings.
What you can change
- the sections and their rows through groups
- the field caption through label and the empty text through placeholder
- the empty-result text through emptyLabel
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/combobox-002?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
The component is self-contained: one file, no dependencies, its own --vibeui-combobox-002-* palette. Client component: useState holds the query, the value and the cursor index, and useMemo rebuilds the groups and the flat row order. The markup is nested: an outer ul with role="listbox", inside it li elements with role="presentation" holding a ul with role="group" and an aria-labelledby pointing at the heading. A group heading is an li with role="presentation", so it does not count towards the rows and the arrows jump over it; the option numbering is continuous and aria-activedescendant rests on it. The counter beside a heading shows how many rows are left in the section after filtering. A group with no matches is dropped entirely: an empty heading misleads more than its absence.
Tags
- combobox
- groups
- sections
- keyboard
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…