- README.md
- index.html
- styles.css
- script.js
- assets/
- logo.svg
- hero.jpg
Three approaches: native details/summary, a JavaScript-controlled button, and a CSS-only checkbox toggle.
Uses the HTML <details> element; keyboard and accessibility built-in.
A button toggles a content container. Uses aria-controls and aria-expanded.
Click Toggle again to collapse.
No JavaScript. A hidden checkbox drives the state.
Q: How do I install?
A: Run npm install in your project.
Q: Does it support TypeScript?
A: Yes, types are included.
Q: Can I customize themes?
A: Use the theme API in theme.config.js.
Toggle the checkbox label to expand or collapse.