Edit page

Accordion

Accordion comprises of vertically stacked items/sections that can be expanded or collapsed to reveal the related content. There can be more than one expanded section at the same time. The sections can be expanded or collapsed by clicking on their title.

Import Syntax

Basic Usage

Controlled Usage

Icon Position

Props

Accordion default

PropertyTypeRequiredDefaultDescription
activeSectionIndexesArrayfalse[]Indexes of the sections that are supposed to be active.
iconPositionEnumfalseendWhere the chevron is positioned in relation to the title
childrenNodefalse-Used to render AccordionSections inside the Accordion.

AccordionSection

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component; should be AccordionTitle and AccordionContent.

AccordionTitle

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component

AccordionContent

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component; can be a node or string.