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.

Open in new tab

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

bash
suprnova live:add dropdown-menu

Usage

html
{% 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.

Open in new tab

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

ParameterDefaultDescription
targetRequiredThe `id` of the native popover list to toggle.
textRequiredThe trigger's visible text.
variant"secondary"The button variant: `primary`, `secondary`, `ghost` or `danger`.

menu

ParameterDefaultDescription
idRequiredThe native popover's `id`, named by the trigger and action items.
keyRequiredA stable `live:key` that preserves the browser-owned open state across compatible morphs.
labelRequiredThe list's accessible name; it is an ordinary list, with no menu role.

menu_link

ParameterDefaultDescription
hrefRequiredThe destination of a real navigation link.
textRequiredThe link's visible text.

menu_action

ParameterDefaultDescription
targetRequiredThe list's `id`; choosing the action hides this popover locally.
actionRequiredThe registered Live action the button invokes.
textRequiredThe action button's visible text.