Expand/Collapse Widgets

What is an Accordion?

An accordion is a graphical control element comprising a vertically stacked list of items, such as labels or thumbnails. Each item can be "expanded" to reveal its associated content or "collapsed" to hide it.

This is often used to save vertical space on a page by showing only the titles of sections until the user explicitly requests more information.

How to Use This Widget

Simply click on the header of any section to expand or collapse its content. The arrow icon will rotate to indicate the current state (down for collapsed, up for expanded).

  • Click header to toggle.
  • Content hides/shows with a smooth animation.
  • Great for FAQs or detailed information sections.

More Information

This widget is implemented using basic HTML, CSS (for styling and transitions), and JavaScript (for toggling the `max-height` property and `active` class).

It's a lightweight and flexible solution for creating interactive content areas on your webpage.

Feel free to customize the styles to match your website's design!