Accordions stack sections that expand in place, so long content stays scannable. In these examples every header is a real button inside a heading with aria-expanded and aria-controls, each panel is a labelled region, and arrow keys, Home and End move between headers. One section is open and one is disabled. Eight styles, light and dark, with HTML, CSS and a few lines of JavaScript. Every example is an original design that comes with its HTML code and a DESIGN.md of colour, type and spacing tokens, in light and dark. Free to use and adapt.
16 examples
Not necessarily. Letting several stay open helps people compare answers; these examples allow it. Closing others automatically can make the page jump.
Yes, for simple cases. Native details elements need no script, but you cannot add arrow-key movement between headers or use a heading level, which the ARIA pattern here provides.
App screens
UI components
Website sections
Website templates
search_ui_screens (e.g. “billing settings, editorial style”), get_ui_flow for a whole journey, and get_ui_screen_code to pull the HTML and DESIGN.md straight into your project.