Combobox
Recent First
A combobox with recent values: the latest choices rise into their own block on top, disappear from the main list and can be cleared in one press.
What you can change
- the list content through options and the starting history through defaultRecent
- the length of the recent block through recentLimit
- the section captions through recentLabel and allLabel
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-006?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-006-* palette. Client component: useState holds the list of recent values, the query, the value and the cursor, and useMemo assembles the two groups and the shared flat order. The selected value moves to the front of the recent list and is trimmed by recentLimit; it is excluded from the main block so that one row does not appear twice and break the arrow count. The section headings are li elements with role="presentation", and the clear control lives right in the heading. The clock icon is drawn with pseudo-elements on a circle: an SVG file would be redundant here. The ARIA roles are complete and the cursor is carried by aria-activedescendant.
Tags
- combobox
- recent
- history
- keyboard
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…