About this set
Four ways to show whether an accordion panel is open, all on the same bordered-card layout. The rotating chevron points down when closed and flips up when open, the most familiar signal. Plus to minus draws a plus from two bars and turns the vertical bar flat while fading it, leaving a minus; it suits FAQ pages where the plus reads as more. The toggle switch puts a small switch in the header that slides on and turns blue when the panel opens, useful for settings-style lists. Numbered puts a round index before each question that fills dark when its panel is open, for step-by-step guides where the order matters. Every marker is drawn in CSS from an empty span that is hidden from assistive technology, so there are no icon fonts or images. In plain CSS and Tailwind the markers react to the open attribute of a native details element; in Bootstrap they react to .accordion-button:not(.collapsed), and Bootstrap’s own chevron is kept for the first variant and hidden for the other three.
What’s included
- Four markers: rotating chevron, plus to minus, toggle switch, numbered index
- Markers drawn in CSS, no icon font or images
- Markers are aria-hidden; state comes from the native element or aria-expanded
- Switch off track darkened to meet 3:1 against the card
- Marker transitions switch off under reduced motion
Accessibility
The headers are summary elements, or buttons with aria-expanded and aria-controls in the Bootstrap version, so the open state is announced without relying on the marker. The markers and index numbers are aria-hidden. Tab reaches each header, Enter or Space toggles it, focus shows a 2px blue outline, and all marker transitions are removed under prefers-reduced-motion.
Customise it
In plain CSS change the --acc-* properties on .acc and the colours in the .pm, .knob and .idx rules. The Bootstrap version uses the same .pm, .knob and .idx rules plus the --bs-accordion-* variables; in Tailwind edit the bg- classes on the marker spans and their group-open: variants.






