Accordion

An accordion is a collapsible and expandable component where selecting the heading of each section allow for the toggling of it contents.

Once imported it can be modified the way you want.

Prefixes

  • ch-accordion
  • ch-accordionTS

Props

Accordions only takes one prop, data. It is an array of objects.

In the TS variant the object is defined as the AccordionData type.

AccordionData:
  • title: string
  • content: ReactNode
Example: An example of the data is provided in the snippet.

Preview

Title 1Title 2Title 3