Creates collapsible content sections where clicking on headings (h2, h3, etc.) toggles the visibility of content below. Also includes reveal functionality for click-to-show content.
Wrap content in a container with class .accordion. The first child element type becomes the toggle trigger (typically h2). Content following each trigger is automatically wrapped and hidden.
.accordion - Main container.accordion-alt - Alternative styling without arrow indicators.no-toggle - Removes the toggle-all button.collapsing - Makes accordion behave like tabs (only one section open at a time)data-button="text" - Custom text for reveal button (default: "Reveal")data-min-text="number" - Minimum characters required before reveal button activatesdata-placeholder="text" - Placeholder text for textarea (when using min-text)data-rows="number" - Number of rows for textarea (default: 5)This content is hidden by default and will slide down when the heading is clicked.
You can include multiple paragraphs and other elements.
Each heading becomes a clickable button that toggles its content section.
Content sections are automatically wrapped and styled.
With the .collapsing class, only one section can be open at a time.
When you open this section, the previous one will automatically close.
This creates a tab-like interface using accordion functionality.
This accordion doesn't have the toggle-all button in the top-left corner.
Users must click individual headings to open/close sections.
This content is hidden until the reveal button is clicked.
Perfect for answers, solutions, or additional information.
This content requires the user to type at least 10 characters before the reveal button becomes active.
Great for encouraging reflection before showing answers.
._bellow containers.accordion-alt for a cleaner look without arrow indicators