Skip to content

Latest commit

 

History

History

accordion

Accordion Component Challenge

Build an Accordion component that displays a list of vertically stacked sections that each contain a title and content snippet. Some HTML is provided for you as example contents along with a chevron icon.

Requirements

  • By default, all sections are collapsed and are hidden from view.
  • Clicking on a section title toggles the contents.
    • If the section is collapsed, the section will be expanded and the contents will be displayed.
    • If the section is expanded, the section will be collapsed and the contents will be hidden.
  • The sections are independent of each other.

Example

Example of Accordion Component