- Core library files
- TypeScript definitions new
- Detailed documentation and examples
Tip: The native element manages focus, toggle state, and accessibility automatically.
Examples of native and custom disclosure patterns. Each controlled content container uses the "details" class.
Uses the built-in <details> element with a details class on the container.
Tip: The native element manages focus, toggle state, and accessibility automatically.
A button toggles visibility of a sibling container with the details class.
Version 3.2 introduces performance improvements, a streamlined API, and better error messages. See the changelog for a complete list of changes.
Each section has a button that controls a corresponding container with the details class.
Install the package via your preferred manager:
npm install @demo/widgets
pnpm add @demo/widgets
yarn add @demo/widgets
Add a minimal config file:
// widgets.config.js
export default {
features: {
analytics: false,
experimental: true
}
}
If something looks off:
DEBUG=widgets*