Collapse
Show and hide content with animation
Basic Collapse
One button — one panel
Press the button to show or hide the additional content.
This panel is shown or hidden when you press the button above. You can place any content here: text, forms, tables, etc.
Multiple Triggers
Two buttons control the same panel
Either button opens or closes the same content.
Both buttons control this same panel. Either one will open or close it.
Link Trigger
Use an <a> tag as the trigger
You can also use a text link to show or hide additional content without interrupting the reading flow.
Links as triggers are useful inside text paragraphs to avoid breaking the visual flow with a large button.
Works with href="#id" or data-bs-target="#id".
Open by Default
Panel starts visible with the show class
Add the show class to the panel so it is visible on page load.
show class.
Multiple Independent Panels
Each button controls its own panel — the last one toggles all
Button with Animated Icon
The chevron rotates on open and close
The icon rotates 180° when expanding each section, providing clear visual feedback to the user.