ComponentsAccordion

Accordion

A simple accordion component that can be used to display collapsible content

Accordion Item 1

Accordion Item 2

Accordion Item 3



The Accordion component is a simple accordion component that can be used to display collapsible content. It is a great way to organize and display information in a structured and visually appealing way. It uses the DropdownText component to display the accordion items.




Props

The Accordion component accepts the following props:

NameTypeDefaultDescription
classNamestring''Additional classes to be added to the accordion container.
itemsarray-An array of objects containing the title and content of each accordion item.
oneOpenbooleanfalseIf true, only one accordion item can be open at a time.

Info

The items prop should be an array of objects, where each object contains a title and description property. The title property is used as the title of the accordion item, and the description property is used as the content of the accordion item.




Usage Examples

Basic Accordion

Accordion Item 1

Accordion Item 2

Accordion Item 3

Accordion with One Open Item

Accordion Item 1

Accordion Item 2

Accordion Item 3