Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Accordion patterns using accordion-wc with native details/summary. Progressive enhancement: works without JavaScript.
The accordion component uses the <accordion-wc> web component built on native HTML <details> and <summary> elements. This provides progressive enhancement: the accordion works without JavaScript, and JavaScript adds exclusive mode and keyboard navigation.
Key features:
A simple accordion with multiple expandable sections. Multiple sections can be open simultaneously.
<accordion-wc> <details open> <summary>Section One</summary> <div> <p>Content for the first section.</p> </div> </details> <details> <summary>Section Two</summary> <div> <p>Content for the second section.</p> </div> </details> <details> <summary>Section Three</summary> <div> <p>Content for the third section.</p> </div> </details></accordion-wc>
Add data-exclusive to allow only one section open at a time. Opening a new section automatically closes the previous one.
<accordion-wc single> <details open> <summary>Only One Open</summary> <div> <p>Opening another section will close this one.</p> </div> </details> <details> <summary>Click Me</summary> <div> <p>The previous section automatically closes.</p> </div> </details></accordion-wc>
A common use case for accordions is displaying frequently asked questions.
<section class="faq"> <h2>Frequently Asked Questions</h2> <accordion-wc> <details> <summary>How do I get started?</summary> <div> <p>Install the package via npm and import the styles.</p> </div> </details> <details> <summary>Is JavaScript required?</summary> <div> <p>No! The accordion works without JavaScript.</p> </div> </details> </accordion-wc></section>
The <accordion-wc> element accepts these data attributes:
| Attribute | Values | Description |
|---|---|---|
data-exclusive |
Boolean (presence) | Only one item can be open at a time. |
open to a <details> element to have it expanded by default<div> for proper animationWeb component documentation
Tab interface component