Sheet

A native modal panel that rises from the bottom of the frame.

A bottom sheet whose open state and focus stay in the browser.

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 sheet

Usage

html
{% import "suprnova-ui/sheet/sheet.html" as sheet %}
{% call sheet::sheet_trigger("details", "View details") %}{% endcall %}{% call sheet::sheet("details", "details", "Details") %}{% call sheet::sheet_close("details") %}{% endcall %}{% endcall %}

Examples

Validated profile

The server validates a display name before saving it in your island; the sheet stays open.

Open in new tab

Keyboard and accessibility

suprnova.sheet - a native modal sheet (OVL-001). sheet_trigger opens it and sheet_close closes it through the sn-sheet element; the dialog element owns the open state, focus containment and Escape, and focus returns to the trigger on close (OVL-005). Keyed and preserved across a compatible morph (OVL-006). The host carries tabindex="-1" so it can take focus when the trigger has left the document.

API reference

sheet_trigger

ParameterDefaultDescription
targetRequiredThe modal's `id` to open locally.
textRequiredThe trigger's visible text.
variant"primary"The button variant: `primary`, `secondary`, `ghost` or `danger`.

sheet

ParameterDefaultDescription
idRequiredThe native dialog's `id`, also used to associate its title and triggers.
keyRequiredA stable `live:key` that preserves the browser-owned open state across compatible morphs.
titleRequiredThe visible heading, associated with the dialog through `aria-labelledby`.

sheet_close

ParameterDefaultDescription
targetRequiredThe modal's `id` to close locally, returning focus to its invoker.
text"Close"The close button's visible text.
variant"secondary"The button variant: `primary`, `secondary`, `ghost` or `danger`.