Expand/Collapse Widget Demo

Example 1: Basic Widget

This is an expand/collapse widget built with HTML, CSS, and JavaScript.

Example 2: FAQ Item

An expand/collapse widget (also known as an accordion) is a UI component that allows users to show or hide sections of content by clicking on a toggle button. This helps save space and improve user experience on web pages.

Example 3: Instructions
  1. Click the button to expand the content
  2. Click again to collapse the content
  3. The arrow icon rotates to indicate the state
  4. Content fades in and out smoothly
Example 4: Additional Information

This widget uses standard HTML, CSS, and JavaScript, making it compatible with all modern browsers including: