Drawer
A modal edge panel that opens from the logical start or end of the frame.
A start drawer of real links that navigate in the page containing the preview.
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 drawerUsage
{% import "suprnova-ui/drawer/drawer.html" as drawer %}
{% call drawer::drawer_trigger("navigation", "Open navigation") %}{% endcall %}{% call drawer::drawer("navigation", "navigation", "Navigation") %}{% call drawer::drawer_close("navigation") %}{% endcall %}{% endcall %}Examples
End drawer with search
An end drawer whose debounced query filters fixed subsystems on the server.
Keyboard and accessibility
suprnova.drawer - a native modal drawer (OVL-001). drawer_trigger opens it and drawer_close closes it through the sn-drawer 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
drawer_trigger
| Parameter | Default | Description |
|---|---|---|
target | Required | The modal's `id` to open locally. |
text | Required | The trigger's visible text. |
variant | "primary" | The button variant: `primary`, `secondary`, `ghost` or `danger`. |
drawer
| Parameter | Default | Description |
|---|---|---|
id | Required | The native dialog's `id`, also used to associate its title and triggers. |
key | Required | A stable `live:key` that preserves the browser-owned open state across compatible morphs. |
title | Required | The visible heading, associated with the dialog through `aria-labelledby`. |
side | "start" | The logical edge to open from: `start` or `end`. |
drawer_close
| Parameter | Default | Description |
|---|---|---|
target | Required | The 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`. |
