Tabs
Local panels with keyboard selection or canonical route links in an explicit mode.
Switch panels with pointer or keyboard input without a server request.
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 tabsUsage
{% import "suprnova-ui/tabs/tabs.html" as tabs %}
{% call tabs::tabs("guides", mode="route", label="Guides") %}{% call tabs::route_tab("/docs", "Manual", current=true) %}{% endcall %}{% endcall %}Examples
Route tabs
Anchors navigate to shareable destinations and mark the current one.
Keyboard and accessibility
suprnova.tabs - two explicit modes (NAV-002). Local tabs: sn-tabs owns the tablist's arrow keys and selection, tabs and panels are keyed and preserved so the selection is the browser's across a morph, and a tab change makes no request. Route tabs: anchors with canonical URLs and aria-current from the server, plain document navigation. The mode is a required argument; there is no default.
API reference
tabs
| Parameter | Default | Description |
|---|---|---|
id | Required | Unique tabs region ID. |
mode | Required | Required mode: local panels or route navigation. |
label | Required | Accessible name of the tabs region. |
tab_list
| Parameter | Default | Description |
|---|---|---|
label | Required | Accessible name of the local tablist. |
tab
| Parameter | Default | Description |
|---|---|---|
key | Required | Unique tab ID and stable morph key. |
panel | Required | ID of the panel this tab controls. |
text | Required | Visible tab label. |
selected | false | Initial selection; subsequent selection belongs to the browser. |
tab_panel
| Parameter | Default | Description |
|---|---|---|
key | Required | Unique panel ID and stable morph key. |
tab | Required | ID of the tab that labels this panel. |
selected | false | Initial visibility; unselected panels start hidden. |
route_tab
| Parameter | Default | Description |
|---|---|---|
href | Required | Canonical destination URL. |
text | Required | Visible destination name. |
current | false | Server-authoritative current route, marked with aria-current. |
