FAQ

FAQ with expand-all control

Counter and a single switch for every answer

Live preview
Build an FAQ block with Tailwind CSS that gives readers bulk control. The header row has a heading on the left and, on the right, a muted count reading how many of the questions are open plus a small bordered button that toggles between "Expand all" and "Collapse all". Below, seven details elements as bordered cards with the question in medium weight, a muted one-line preview of the answer that is hidden once the item opens, and a chevron that rotates. Answers are relaxed grey prose. Add a footer row with a bordered box offering a link to the full documentation and a support email. Then add JavaScript that keeps the counter in sync with any toggle, switches the button label and behaviour depending on whether every item is already open, and updates the preview visibility when an item opens or closes.