Accordion
Accordions display an expandable/collapsible list of items. The final Accordion component is a compound of the following:
-
Accordion: wraps a series ofAccordionItems in a single component.-
AccordionItem: wraps anAccordionButtonand anAccordionPanel.-
AccordionButton: contains the top-level items of the Accordion list. It is a clickable button that shows or hides the child items of a givenAccordionItem. -
AccordionPanel: contains the child items of a givenAccordionItem.
-
-
Importโ
import { Accordion, AccordionItem, AccordionButton, AccordionPanel } from '@faststore/ui'
Usageโ
Multiple and collapsibleโ
Toggle with iconโ
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-fs-accordion
data-accordion-item
data-accordion-button
data-accordion-panel
The AccordionButton component inherits Button css selectors.