Advanced Select
Theme-aware, responsive advanced select component.
Combo Box
Editable autocomplete combobox with local and remote suggestions.
Copy Markup
Theme-aware, responsive copy markup component.
Input Number
Theme-aware, responsive input number component.
Pin Input
Secure multi-cell PIN and verification-code input with regex and paste support.
Search Box
Theme-aware, responsive search box component.
Strong Password
Theme-aware, responsive strong password component.
Toggle Count
Theme-aware, responsive toggle count component.
Toggle Password
Accessible password field with optional show and hide controls.
Base
-28 unique, responsive, theme-aware components. Open a component to inspect multiple live configurations and its complete props API.
- +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
Theme-aware, responsive button component.
Button Group
Theme-aware, responsive button group component.
Supporting content belongs inside the default slot.
Card
Theme-aware, responsive card component.
Card
Group related content in a responsive themed surface with title, description, content, and supporting slots.
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.
Hero Actions
Responsive action group for hero and call-to-action sections.
Legend Indicator
Theme-aware, responsive legend indicator component.
List
Theme-aware, responsive list component.
List
Present structured responsive linked or status items with icons, descriptions, actions, and selection events.
List Group
Theme-aware, responsive list group component.
Marquee
Theme-aware, responsive marquee component.
Marquee
Continuously present responsive labels, partners, notices, or capabilities with pause and resume behavior.
Progress
Theme-aware, responsive progress component.
Rating
Theme-aware, responsive rating component.
Skeleton
Theme-aware, responsive skeleton component.
Spinner
Theme-aware, responsive spinner component.
Styled Icon
Theme-aware, responsive styled icon component.
Timeline
Theme-aware, responsive timeline component.
Timeline
Present responsive chronological activity, milestones, or workflow status with rich item metadata.
Toast
Theme-aware, responsive toast component.
Tree View
Theme-aware, responsive tree view component.
Colors
Semantic primary, secondary, success, warning, danger, and info tokens remain available in every palette.
Brand colors
Primary and secondary tokens communicate brand hierarchy.
Status colors
Success, warning, danger, and info preserve their semantic meaning in every palette.
Component override
Pass color="success" or another semantic color to any component.
Configure Accordion
Change any prop and inspect the server-rendered component immediately.
<Accordion
- id="accordion-example-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."
+ "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": "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."
+ "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"
+ ]
}
]'
defaultOpen='[
- "first"
+ {
+ "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"
+ ]
+ },
+ {
+ "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"
+ ]
+ }
]'
- contentItalic="true"
/>
event.detail.Designed for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
Default accordion
Open one section at a time with a clear plus and minus indicator.
Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
<Accordion
- id="accordion-example-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."
+ "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": "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."
+ "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"
+ ]
}
]'
defaultOpen='[
- "first"
+ {
+ "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"
+ ]
+ },
+ {
+ "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"
+ ]
+ }
]'
- contentItalic="true"
/>
Always open
Allow several content sections to remain expanded at the same time.
Compact application
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<Accordion
- id="accordion-example-2"
+ size="sm"
+ variant="secondary"
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."
+ "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": "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."
+ "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"
+ ]
}
]'
defaultOpen='[
- "first",
- "second"
+ {
+ "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"
+ ]
+ },
+ {
+ "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"
+ ]
+ }
]'
- alwaysOpen="true"
- contentItalic="true"
/>
Nested accordion
Place a coordinated secondary accordion inside an expanded parent section.
Rich configuration
A more expressive variation using additional data, stronger emphasis, and optional states.
<Accordion
- id="accordion-example-3"
+ size="lg"
+ variant="success"
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": [
+ "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": "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 A",
+ "value": "nested-a"
},
{
- "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."
- },
- {
- "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."
+ "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."
+ "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"
+ ]
}
]'
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."
+ "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": [
+ {
+ "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."
+ "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"
+ ]
}
]'
- 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"
/>
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 eventsRespond to every public interaction
Use declarative @event handlers in .wrn files or subscribe to the bubbling browser events from JavaScript.
@changeFires when the component's committed value or selection changes.@openFires after the component opens.@closeFires after the component closes.Declarative handlers.wrn <Accordion
+ @change='console.log(event.detail)'
+ @open='console.log(event.detail)'
+ @close='console.log(event.detail)'
+/>
Browser listeners.js const component = document.querySelector("[data-ui-component=\"Accordion\"], [data-component=\"Accordion\"]")
-component.addEventListener('change', (event) => {
- console.log(event.detail)
-})
+component?.addEventListener("change", (event) => {
+ console.log("change", event.detail)
+})
+
+component?.addEventListener("open", (event) => {
+ console.log("open", event.detail)
+})
+
+component?.addEventListener("close", (event) => {
+ console.log("close", 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 |
Configure Advanced Date Picker
Change any prop and inspect the server-rendered component immediately.
<AdvancedDatePicker
@@ -147,6 +147,7 @@ page AdvancedDatePickerDetail {
/>
event.detail.