Disclosures can be nested to create multi-level hierarchies. Visual depth is communicated through subtle background color changes.
Everything you need to know to start using the component library.
Install the package using your preferred package manager.
npm install @disclosures/core
yarn add @disclosures/core
pnpm add @disclosures/core
Add the CSS and JS to your page, then use the markup pattern.
<link rel="stylesheet" href="@disclosures/core/dist/styles.css"> <script src="@disclosures/core/dist/index.global.js"></script> <script>Disclosures.autoInit();</script>
Reference documentation for all available components.
The core class that wraps a native <details> element and adds smooth height transitions using the Web Animations API.
Manages a group of details elements as an accordion, ensuring only one is open at a time.
Detailed API documentation for options, methods, and CSS custom properties.