Accordion
Collapsible content sections with expand/collapse animation. Supports single or multiple open items, three visual variants, keyboard navigation, and full ARIA accordion pattern.
Design tokens are named values — colors, spacing, radii — that form the single source of truth for your design system.
Semantic tokens map to foundation tokens. Swap the foundation layer and the entire UI updates automatically.
Yes — semantic tokens handle dark mode via the CSS light-dark() function. No manual dark: classes needed.
01 Examples
FAQ Section
Frequently Asked Questions
Everything you need to know to get started.
Basic Svelte knowledge helps, but our components are designed with simple, declarative APIs. If you can write HTML and pass props, you're good to go. Check the Getting Started guide for a gentle introduction.
We use a 3-layer token system: foundation, semantic, and interaction tokens. Dark
mode is handled automatically via light-dark() — no manual dark: classes
needed.
Absolutely. Every component is tree-shakeable. Import only what you need and your bundle stays lean.
Yes. All components follow WAI-ARIA patterns, support keyboard navigation, and
include proper focus management. We test with screen readers and respect prefers-reduced-motion.
Controlled State
Custom Trigger
Includes community support, basic components, and public repos only.
Priority support, private repos, advanced theming, and early access to new components.
02 Built on Collapsible
Accordion vs Collapsible
Single panel → Collapsible
Use Collapsible when you
need a single panel that manages its own state. No context, no coordination — just expand
and collapse.
Multi-panel → Accordion
Architecture note: Each AccordionItem uses Collapsible internally
for its expand/collapse animation and ARIA attributes. The Accordion component adds
multi-item coordination (single/multiple mode, non-collapsible, disabled) on top. See the Collapsible docs for the standalone API.
03 Customization
slotClasses Override
Glassmorphism (unstyled)
unstyled gives full creative
freedom while keeping structure, animation, and accessibility intact.Terminal (unstyled)
NODE_ENV=production
PORT=3000
LOG_LEVEL=info
Process exited with code 0
● app.service - Application Server
Active: active (running)
Memory: 128.4M
[12:34:01] GET /api/health 200 2ms
[12:34:03] POST /api/users 201 45ms
[12:34:05] Listening on :3000
04 Accessibility
Built-in ARIA
Each trigger uses aria-expanded and aria-controls to link to its content panel. Content
panels have role="region" with aria-labelledby pointing back to the trigger. The data-state attribute exposes open / closed for CSS-only styling.
Keyboard Navigation
Tab moves focus between triggers. Enter / Space toggle the focused item. Focus rings use focus-visible: so they only appear on keyboard navigation,
never on mouse clicks.
Disabled State
Disabled triggers get the native disabled attribute, removing them from the tab
order and preventing activation. Visual feedback via opacity-50 and cursor-not-allowed.
Reduced Motion
The expand/collapse animation uses CSS grid-template-rows transitions. When prefers-reduced-motion is enabled, transition durations
are reduced via the design token system.
05 API Reference
No matching properties |