Content v1.0.0

Accordion

Expandable content sections for organizing information. Available in basic (single open), always-open (multiple), and nested variants.

Basic

Only one item can be open at a time

Options

Name Type Default Description
items * Array required Array of hashes with :title and :content keys
default_open Integer nil Index of initially open item (nil for all closed)
class String "" Additional CSS classes for the container

Always Open

Multiple items can be open simultaneously

Options

Name Type Default Description
items * Array required Array of hashes with :title and :content keys
default_open Array [] Array of indices for initially open items
class String "" Additional CSS classes for the container

Nested

Accordion within accordion for hierarchical content

Options

Name Type Default Description
items * Array required Array of hashes with :title and :content (can include nested accordion)
default_open Array [] Array of indices for initially open items
class String "" Additional CSS classes for the container

Changelog v1.0.0

- v1.0.0: Initial release with basic, always-open, and nested variants
- Full keyboard accessibility
- Stimulus controller for state management

Get Full Access

Unlock the source code for this component and all others. One-time payment for lifetime access.

Get Access Now