Dropdown Menu
Sort Menu
A sort menu that spells the chosen field and direction on the button itself: once closed, nothing else tells you how the list is ordered.
What you can change
- the caption before the value through label
- the selected field through value and the field set through fields
- the reaction to a pick through onChange
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/dropdown-009?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
One file, zero dependencies, the --vibeui-dropdown-009-* palette. A client component: useState holds the field and the direction, and they leave as a single object through onChange. The menu holds two radio groups — the field and the order — each with role=group and aria-labelledby pointing at its own heading; the items are marked role=menuitemradio with aria-checked. The direction arrow is inline SVG, and the 180° turn is done by data-desc on the root rather than by a second glyph. The down arrow on the button opens the menu and puts the focus on the selected field. The menu placement is anchor-name with position-area inside @supports. The palette is moved to light-dark(): in a dark environment the panel is lighter than the page background and its border lighter than the panel.
Tags
- menu
- dropdown
- sort
- radio
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…