Dropdown menu
A single-level popover list of real links or registered server actions.
An ordinary list of links; native popover opening and dismissal send no Live request.
Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.
Installation
suprnova live:add dropdown-menuUsage
{% import "suprnova-ui/dropdown-menu/dropdown-menu.html" as dropdown_menu %}
{% call dropdown_menu::menu_trigger("docs", "Documentation") %}{% endcall %}{% call dropdown_menu::menu("docs", "docs", "Documentation") %}{% call dropdown_menu::menu_link("/docs/live", "Live manual") %}{% endcall %}{% endcall %}Examples
Server actions
Star or unstar the demo project; each action hides the menu and answers from the server.
Keyboard and accessibility
suprnova.dropdown-menu - a single-level list of choices in a native popover (OVL-001, OVL-003). Navigation items are real anchors; action items are buttons that invoke a registered action and hide the menu. The list carries no menu role: it is an ordinary list of links and buttons, so no script owns its keyboard behaviour.
API reference
menu_trigger
| Parameter | Default | Description |
|---|---|---|
target | Required | The `id` of the native popover list to toggle. |
text | Required | The trigger's visible text. |
variant | "secondary" | The button variant: `primary`, `secondary`, `ghost` or `danger`. |
menu
| Parameter | Default | Description |
|---|---|---|
id | Required | The native popover's `id`, named by the trigger and action items. |
key | Required | A stable `live:key` that preserves the browser-owned open state across compatible morphs. |
label | Required | The list's accessible name; it is an ordinary list, with no menu role. |
menu_link
| Parameter | Default | Description |
|---|---|---|
href | Required | The destination of a real navigation link. |
text | Required | The link's visible text. |
menu_action
| Parameter | Default | Description |
|---|---|---|
target | Required | The list's `id`; choosing the action hides this popover locally. |
action | Required | The registered Live action the button invokes. |
text | Required | The action button's visible text. |
