Accordion
A group of native disclosures with shared or independent expansion.
A shared name keeps one item open where the browser supports it; older browsers expand independently.
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 accordionUsage
{% import "suprnova-ui/accordion/accordion.html" as accordion %}
{% call accordion::accordion("faq") %}{% call accordion::accordion_item("faq", "installation", "How do I install it?") %}<p>Run suprnova live:add accordion.</p>{% endcall %}{% endcall %}Examples
Independent items
Distinct names let several items stay open without a server request.
Keyboard and accessibility
suprnova.accordion - a group of native disclosures. Items share the group's name so the browser keeps one open at a time where details name is supported (Chrome 120, Firefox 130, Safari 17.2); older supported browsers open items independently. Each item is keyed and preserved like a collapsible (OVL-001, OVL-006).
API reference
accordion
| Parameter | Default | Description |
|---|---|---|
name | Required | The group name, shared by single-open items through their native `name` attribute. |
accordion_item
| Parameter | Default | Description |
|---|---|---|
name | Required | The item's native disclosure name; share a name for single-open items, use distinct names for independent expansion. |
key | Required | A stable `live:key` that preserves this item's browser-owned open state across compatible morphs. |
summary | Required | The disclosure's visible summary and accessible trigger text. |
open | false | Whether the item starts expanded; subsequent open state belongs to the browser. |
