Input Number
Theme-aware, responsive input number component.
Toggle Count
Theme-aware, responsive toggle count component.
Base
27 unique, responsive, theme-aware components. Open a component to inspect multiple live configurations and its complete props API.
- +Accordion
Theme-aware, responsive accordion component.
Alert
Theme-aware, responsive alert component.
Avatar
Theme-aware, responsive avatar component.
Avatar Group
Theme-aware, responsive avatar group component.
Badge
Theme-aware, responsive badge component.
Blockquote
Theme-aware, responsive blockquote component.
Button Group
Theme-aware, responsive button group component.
Card
Theme-aware, responsive card component.
Carousel
Theme-aware, responsive carousel component.
Chat Bubble
Theme-aware, responsive chat bubble component.
Collapse
Theme-aware, responsive collapse component.
Date Picker
Theme-aware, responsive date picker component.
Device Frame
Theme-aware, responsive device frame component.
File Upload Progress
Theme-aware, responsive file upload progress component.
Accordion
Theme-aware, responsive accordion component.
-Configure Accordion
Change any prop and inspect the server-rendered component immediately.
<Accordion
+ id="accordion-example-1"
items='[
{
- "id": "accordion-0-1",
- "key": "accordion-0-1",
- "value": "primary",
- "label": "Primary workflow",
- "title": "Primary workflow",
- "description": "A clean default configuration for everyday product interfaces.",
- "text": "A configurable sample message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--sparkles]",
- "iconClass": "icon-[lucide--sparkles]",
- "variant": "primary",
- "status": "Active",
- "time": "09:30",
- "current": true,
- "selected": true,
- "checked": true,
- "disabled": false,
- "outgoing": false,
- "open": true,
- "number": 1,
- "count": 16,
- "percentage": 72,
- "color": "#7c3aed",
- "target": "_self",
- "ariaLabel": "Open primary workflow 1",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
},
{
- "id": "accordion-0-2",
- "key": "accordion-0-2",
- "value": "secondary",
- "label": "Additional option",
- "title": "Supporting example",
- "description": "A clean default configuration for everyday product interfaces.",
- "text": "Another configurable message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--sparkles]",
- "iconClass": "icon-[lucide--sparkles]",
- "variant": "primary",
- "status": "Active",
- "time": "09:30",
- "current": false,
- "selected": false,
- "checked": false,
- "disabled": false,
- "outgoing": true,
- "open": true,
- "number": 2,
- "count": 32,
- "percentage": 72,
- "color": "#7c3aed",
- "target": "_self",
- "ariaLabel": "Open primary workflow 2",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
}
- ]'>
- <!-- Add default slot content here -->
-</Accordion>
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ contentItalic="true"
+/>
Designed for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
Default accordion
Open one section at a time with a clear plus and minus indicator.
<Accordion
+ id="accordion-example-1"
items='[
{
- "id": "accordion-0-1",
- "key": "accordion-0-1",
- "value": "primary",
- "label": "Primary workflow",
- "title": "Primary workflow",
- "description": "A clean default configuration for everyday product interfaces.",
- "text": "A configurable sample message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--sparkles]",
- "iconClass": "icon-[lucide--sparkles]",
- "variant": "primary",
- "status": "Active",
- "time": "09:30",
- "current": true,
- "selected": true,
- "checked": true,
- "disabled": false,
- "outgoing": false,
- "open": true,
- "number": 1,
- "count": 16,
- "percentage": 72,
- "color": "#7c3aed",
- "target": "_self",
- "ariaLabel": "Open primary workflow 1",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
},
{
- "id": "accordion-0-2",
- "key": "accordion-0-2",
- "value": "secondary",
- "label": "Additional option",
- "title": "Supporting example",
- "description": "A clean default configuration for everyday product interfaces.",
- "text": "Another configurable message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--sparkles]",
- "iconClass": "icon-[lucide--sparkles]",
- "variant": "primary",
- "status": "Active",
- "time": "09:30",
- "current": false,
- "selected": false,
- "checked": false,
- "disabled": false,
- "outgoing": true,
- "open": true,
- "number": 2,
- "count": 32,
- "percentage": 72,
- "color": "#7c3aed",
- "target": "_self",
- "ariaLabel": "Open primary workflow 2",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
}
- ]'>
- <!-- Add default slot content here -->
-</Accordion>
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ contentItalic="true"
+/>
Compact application
A tighter variation for dashboards, side panels, tables, and operational interfaces.
Always open
Allow several content sections to remain expanded at the same time.
<Accordion
- size="sm"
+ id="accordion-example-2"
items='[
{
- "id": "accordion-1-1",
- "key": "accordion-1-1",
- "value": "primary",
- "label": "Secondary workflow",
- "title": "Secondary workflow",
- "description": "A compact configuration designed for dense application layouts.",
- "text": "A configurable sample message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--zap]",
- "iconClass": "icon-[lucide--zap]",
- "variant": "secondary",
- "status": "Active",
- "time": "10:15",
- "current": true,
- "selected": true,
- "checked": true,
- "disabled": false,
- "outgoing": false,
- "open": true,
- "number": 1,
- "count": 24,
- "percentage": 48,
- "color": "#0284c7",
- "target": "_self",
- "ariaLabel": "Open secondary workflow 1",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
},
{
- "id": "accordion-1-2",
- "key": "accordion-1-2",
- "value": "secondary",
- "label": "Additional option",
- "title": "Supporting example",
- "description": "A compact configuration designed for dense application layouts.",
- "text": "Another configurable message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "View details",
- "icon": "icon-[lucide--zap]",
- "iconClass": "icon-[lucide--zap]",
- "variant": "secondary",
- "status": "Active",
- "time": "10:15",
- "current": false,
- "selected": false,
- "checked": false,
- "disabled": false,
- "outgoing": true,
- "open": true,
- "number": 2,
- "count": 48,
- "percentage": 48,
- "color": "#0284c7",
- "target": "_self",
- "ariaLabel": "Open secondary workflow 2",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Standard"
- ]
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
}
- ]'>
- <!-- Add default slot content here -->
-</Accordion>
+ ]'
+ defaultOpen='[
+ "first",
+ "second"
+ ]'
+ alwaysOpen="true"
+ contentItalic="true"
+/>
Rich configuration
A more expressive variation using additional data, stronger emphasis, and optional states.
Nested accordion
Place a coordinated secondary accordion inside an expanded parent section.
<Accordion
- size="lg"
+ id="accordion-example-3"
items='[
{
- "id": "accordion-2-1",
- "key": "accordion-2-1",
- "value": "primary",
- "label": "Advanced workflow",
- "title": "Advanced workflow",
- "description": "A richer configuration with more supporting information and actions.",
- "text": "A configurable sample message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "Explore workflow",
- "icon": "icon-[lucide--circle-check]",
- "iconClass": "icon-[lucide--circle-check]",
- "variant": "success",
- "status": "Complete",
- "time": "11:45",
- "current": true,
- "selected": true,
- "checked": true,
- "disabled": false,
- "outgoing": false,
- "open": true,
- "number": 1,
- "count": 32,
- "percentage": 91,
- "color": "#059669",
- "target": "_self",
- "ariaLabel": "Open advanced workflow 1",
- "items": [
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure.",
+ "children": [
{
- "label": "Nested option A",
- "value": "nested-a"
+ "value": "sub-first",
+ "label": "Sub accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
},
{
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
+ "value": "sub-second",
+ "label": "Sub accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
},
{
- "label": "API reference",
- "href": "#api-reference"
+ "value": "sub-third",
+ "label": "Sub accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
}
- ],
- "values": [
- "Included",
- "Unlimited"
]
},
{
- "id": "accordion-2-2",
- "key": "accordion-2-2",
- "value": "secondary",
- "label": "Additional option",
- "title": "Supporting example",
- "description": "A richer configuration with more supporting information and actions.",
- "text": "Another configurable message.",
- "href": "#accordion-demo",
- "actionHref": "#accordion-demo",
- "actionLabel": "Explore workflow",
- "icon": "icon-[lucide--circle-check]",
- "iconClass": "icon-[lucide--circle-check]",
- "variant": "success",
- "status": "Complete",
- "time": "11:45",
- "current": false,
- "selected": false,
- "checked": false,
- "disabled": true,
- "outgoing": true,
- "open": true,
- "number": 2,
- "count": 64,
- "percentage": 91,
- "color": "#059669",
- "target": "_self",
- "ariaLabel": "Open advanced workflow 2",
- "items": [
- {
- "label": "Nested option A",
- "value": "nested-a"
- },
- {
- "label": "Nested option B",
- "value": "nested-b"
- }
- ],
- "links": [
- {
- "label": "Documentation",
- "href": "#documentation"
- },
- {
- "label": "API reference",
- "href": "#api-reference"
- }
- ],
- "values": [
- "Included",
- "Unlimited"
- ]
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
}
- ]'>
- <!-- Add default slot content here -->
-</Accordion>
+ ]'
+ defaultOpen='[
+ "first",
+ "first.sub-first"
+ ]'
+ alwaysOpen="true"
+ contentItalic="true"
+/>
+ Without an indicator
Use a minimal text-only accordion when visual indicators are unnecessary.
<Accordion
+ id="accordion-example-4"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ showIndicator="false"
+ contentItalic="true"
+/>
+ Chevron indicator
Communicate expanded state with a rotating chevron.
<Accordion
+ variant="chevron"
+ id="accordion-example-5"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ indicator="chevron"
+ contentItalic="true"
+/>
+ Separated title and indicator
Place the title and state indicator at opposite ends of each trigger.
<Accordion
+ variant="chevron"
+ id="accordion-example-6"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ indicator="chevron"
+ indicatorPosition="end"
+ contentItalic="true"
+/>
+ Bordered accordion
Group sections inside one bordered surface with dividing lines.
<Accordion
+ id="accordion-example-7"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ bordered="true"
+ contentItalic="true"
+/>
+ Bordered open content
Render each section as an independent rounded card.
<Accordion
+ id="accordion-example-8"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "second"
+ ]'
+ indicatorPosition="end"
+ separated="true"
+ contentItalic="true"
+/>
+ Disabled section
Disable an individual section while keeping the rest of the accordion interactive.
<Accordion
+ id="accordion-example-9"
+ items='[
+ {
+ "value": "first",
+ "label": "Accordion #1",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ },
+ {
+ "value": "second",
+ "label": "Accordion #2",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure.",
+ "disabled": true
+ },
+ {
+ "value": "third",
+ "label": "Accordion #3",
+ "content": "This is the item\'s accordion body. It is hidden by default until the section is opened. Use it for supporting details, explanations, or progressive disclosure."
+ }
+ ]'
+ defaultOpen='[
+ "first"
+ ]'
+ contentItalic="true"
+/>
Props and configuration
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
items | string | [] | No |
multiple | boolean | false | No |
class | string | "" | No |
Events
Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.
@changeFires when the component value or selection changes.@openFires when the component opens.@closeFires when the component closes.const component = document.querySelector('[data-wrn-events]')
+
+component.addEventListener('change', (event) => {
+ console.log(event.detail)
+})Props and configuration
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
variant | string | "default" | No |
class | string | "" | No |
id | string | "accordion" | No |
items | string | [] | No |
defaultOpen | string | [] | No |
multiple | boolean | false | No |
alwaysOpen | boolean | false | No |
disabled | boolean | false | No |
indicator | string | "plus" | No |
indicatorPosition | string | "start" | No |
showIndicator | boolean | true | No |
bordered | boolean | false | No |
separated | boolean | false | No |
flush | boolean | false | No |
contentItalic | boolean | false | No |