Popover

A native non-modal popover for supplementary text or interactive content.

Installation help and a real link in a locally opened popover.

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 popover

Usage

html
{% import "suprnova-ui/popover/popover.html" as popover %}
{% call popover::popover_trigger("help", "Help") %}{% endcall %}{% call popover::popover("help", "help", "Help") %}<p>Additional information.</p>{% endcall %}

Examples

Server preference

A switch updates your island on the server while the popover stays open locally.

Open in new tab

Keyboard and accessibility

suprnova.popover - a native popover (OVL-001): the popover attribute owns the open state and light dismiss, the trigger is a popovertarget invoker, and the browser positions the panel against its invoker where CSS anchor positioning exists (the invoker is the implicit anchor) and centres it otherwise. Keyed and preserved across morphs (OVL-006).

API reference

popover_trigger

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

popover

ParameterDefaultDescription
idRequiredThe popover's `id`, named by its trigger.
keyRequiredA stable `live:key` that preserves the browser-owned open state across compatible morphs.
labelRequiredThe popover's accessible name.