Accordion

The Accordion component lets users create a collapsible sections of related content on a page.

Default Accordion

Accordion 1

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 2

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 3

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Import component

jsx

import { Accordion, AccordionHeader, AccordionDetails, Text, Block } from "landing-page-ui"

Accordion With Icon

Accordion 1

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 2

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 3

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion With Toggle Icon

Accordion 1

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 2

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 3

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion Style with Predefined Variations

Accordion 1

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 2

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Accordion 3

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima deserunt sapiente nostrum iure excepturi vel debitis, quae quibusdam officiis. Atque nesciunt pariatur praesentium optio, at vel harum aliquam illo labore?

Here are the variation list for Accordion components.

Props

Explore the available props for the Accordion component

PropTypeDefaultDescription
activebooleanfalseActive state of the accordion.
deactivatebooleanfalseDeactivate state of the accordion.
childrennode-Child components and content to be placed within it.
stylestring-Any CSS className to style the Accordion.
headerStylestring-Any CSS className to style the Accordion Header.
detailsStylestring-Any CSS className to style the Accordion Details.
activeHeaderStylestring-Any CSS className to style the Accordion Active Header.
deactivateHeaderStylestring-Any CSS className to style the Accordion Deactivate Header.
variantnumber"1"Variant of the accordion

Explore the available props for the AccordionHeader component

PropTypeDefaultDescription
iconstringfa-caret-rightIcon name for accordion
toggleIconstringfa-caret-downToggle icon for accordion.
iconLibrarystringfont-awesomeIcon library name.
font-awesome bootstrap-icons icon-font
toggleIconLibrarystring-Icon library name.
font-awesome bootstrap-icons icon-font
iconStylestring-Any CSS className to style the Accordion Header Icon.
toggleIconStylestring-Any CSS className to style the Accordion Header Toggle Icon.
iconPositionstringbeforeIcon position value.
before after
childrennode-Child components and content to be placed within it.
stylestring-Any CSS className to style the Accordion Header Label.
activeStylestring-Any CSS className to style the Accordion Active Header.
deactivateStylestring-Any CSS className to style the Accordion Deactivate Header.
variantnumber"1"Variant of the accordion

Explore the available props for the AccordionDetails component

PropTypeDefaultDescription
tagNamestringdivHTML Tag name.
childrennode-Child components and content to be placed within it.
stylestring-Any CSS className to style the Accordion Header Label.
variantnumber"1"Variant of the accordion