Collapsible
A single expand/collapse panel with smooth animation, a default or custom trigger, and full ARIA support. The low-level primitive behind Accordion — use it standalone for simple show/hide patterns or as a building block for compound components.
Design tokens are named values — colors, spacing, radii — that form the single source of truth for your design system. They bridge the gap between design tools and code.
01 Examples
FAQ item
Named values — colors, spacing, radii — that form the single source of truth for your design system. They bridge the gap between design tools and code.
No. Every component ships with sensible defaults. Tailwind helps when you want to
override styles via slotClasses, but it's optional.
Yes. The components are SSR-safe and hydrate without layout shift. See the SvelteKit adapter docs for setup details.
Controlled section toggle
This panel is controlled via bind:open. Toggle it with the button above or by clicking the trigger.
Release-notes item with custom trigger
Features: New Collapsible component, improved Accordion internals, Stepper navigation.
Fixes: Dialog focus trap on Safari, Tooltip positioning near edges.
02 Customization
slotClasses Override
Glassmorphism (unstyled)
Terminal (unstyled)
NODE_ENV=production
PORT=3000
LOG_LEVEL=info
Process exited with code 0
03 Accessibility
Built-in ARIA
The default trigger uses aria-expanded and aria-controls to link to the content panel. The content panel has 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 to the trigger. Enter / Space toggle the content. Focus rings use focus-visible: so they only appear on keyboard navigation.
Custom Triggers
When using the trigger snippet, the component
passes triggerId and contentId so you can wire up aria-expanded and aria-controls yourself. The content region always
gets the correct aria-labelledby.
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.
04 API Reference
No matching properties |