About this set
Two accordion patterns for documentation and navigation. Nested places a second accordion inside an open panel: the inner items use a lighter grey card, a smaller medium-weight title and tighter padding, so the hierarchy is clear without indentation, and each inner chevron responds only to its own panel. Sidebar navigation turns the accordion into a menu of collapsible groups, such as Components and Templates, each holding a list of links; the header gets rounded hover fills and the links are indented under it, with the current page marked in blue. Use the nested pattern for sub-topics inside a help article and the sidebar for a docs or dashboard navigation column up to about 290px wide. The plain CSS and Tailwind versions are nested native details elements with no script. The Bootstrap version nests one .accordion inside another and fills the sidebar panels with Bootstrap’s .nav.flex-column and .nav-link, restyled through the –bs-nav-link-* variables.
What’s included
- Nested accordion with lighter inner cards
- Sidebar menu with collapsible link groups inside a nav landmark
- Current page marked with aria-current="page"
- Inner chevrons react only to their own panel
- Bootstrap version uses nested .accordion and .nav.flex-column
Accessibility
The sidebar is a nav element with an aria-label, and the current link carries aria-current="page". Headers are summary elements, or buttons with aria-expanded and aria-controls in Bootstrap, and nested headers are reachable in normal Tab order. Headers and links show a 2px blue focus outline, and transitions are removed under prefers-reduced-motion.
Customise it
Change the --acc-* properties on .acc and the colours in the .acc-nest and .acc-side rules. In Bootstrap adjust the --bs-accordion-* variables on .acc-inner and .acc-side and the --bs-nav-link-* variables on .nav; in Tailwind edit the colour classes and the aria-[current=page]: variants on the links.






