Sidebar

Section links grouped in native disclosures with browser-local collapse state.

An expanded navigation group with an authoritative current link.

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 sidebar

Usage

html
{% import "suprnova-ui/sidebar/sidebar.html" as sidebar %}
{% call sidebar::sidebar("sections") %}{% call sidebar::sidebar_group("guides", "Guides") %}{% call sidebar::sidebar_link("/docs", "Manual", current=true) %}{% endcall %}{% endcall %}{% endcall %}

Examples

Collapsible groups

One group starts expanded and another collapsed; toggling is local.

Open in new tab

Keyboard and accessibility

suprnova.sidebar - section navigation with collapsible groups (NAV-001, NAV-004). Each group is a native details element, keyed and preserved, so its open state is the browser's and survives a morph; the current link carries aria-current from the server-bound `current` value.

API reference

sidebar

ParameterDefaultDescription
idRequiredUnique sidebar navigation ID.
label"Sections"Accessible name of the section navigation.

sidebar_group

ParameterDefaultDescription
keyRequiredStable group identity preserved across morphs.
titleRequiredVisible disclosure heading.
opentrueInitial expanded state; subsequent toggles belong to the browser.

sidebar_link

ParameterDefaultDescription
hrefRequiredReal destination URL.
textRequiredVisible destination name.
currentfalseServer-authoritative current destination, marked with aria-current.