Dropdown Menu
Anchored Dropdown
A dropdown with no JS: the HTML popover attribute handles opening, and CSS anchor positioning keeps it next to its button.
What you can change
- the items array: labels, hrefs, the separated and danger flags
- trigger — the button label
- id — one per menu on the page
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-001?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 palette in local variables --vibeui-dropdown-001-*. Opening comes from the popover and popovertarget attributes, and the placement from anchor-name on the button and position-anchor with position-area on the menu, inside @supports. The menu lives in the top layer, so it is styled by the [data-vibeui-dropdown-001-menu] attribute and gets its palette through its own style. The open prop moves the menu into the page flow for the showcase and for screenshots: popover is not used in that mode.
Tags
- dropdown
- menu
- popover
- no-js
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…