Skip to main content

Accordion

Accordions display an expandable/collapsible list of items. The final Accordion component is a compound of the following:

  • Accordion: wraps a series of AccordionItems in a single component.

    • AccordionItem: wraps an AccordionButton and an AccordionPanel.

      • AccordionButton: contains the top-level items of the Accordion list. It is a clickable button that shows or hides the child items of a given AccordionItem.

      • AccordionPanel: contains the child items of a given AccordionItem.

Importโ€‹

import { Accordion, AccordionItem, AccordionButton, AccordionPanel } from '@faststore/ui'

Usageโ€‹

Multiple and collapsibleโ€‹

Loading...

Toggle with iconโ€‹

Loading...

Propsโ€‹

All accordion-related components support all attributes also supported by the <div> tag, except for the AccordionButton, which renders the <button> tag.

Besides those attributes, the following props are also supported:

Accordionโ€‹

AccordionItemโ€‹

AccordionPanelโ€‹

Customizationโ€‹

data-store-accordion

data-accordion-item

data-accordion-button

data-accordion-panel

The AccordionButton component inherits Button css selectors.

Didn't find your answers? Ask the Community. For documentation suggestions, submit your feedback.

JOIN THE COMMUNITY