@spark-web/accordion
v1.2.0
Published
--- title: Accordion storybookPath: data-display-accordion--single isExperimentalPackage: true ---
Downloads
1,908
Readme
title: Accordion storybookPath: data-display-accordion--single isExperimentalPackage: true
Accordions are a set of vertically stacked headings which can be toggled to reveal some associated section of content.
Example
<Accordion type="single" collapsible>
<AccordionItem value="item-1" label="What is this?" level="4">
<Text>This is an example accordion</Text>
</AccordionItem>
<AccordionItem value="item-2" label="Should I click this?" level="4">
<Text>Yes</Text>
</AccordionItem>
<AccordionItem value="item-3" label="What is in it for me?" level="4">
<Text>A nice accordion</Text>
</AccordionItem>
</Accordion>
Props
Accordion
The root of the accordion block containing all parts of the accordion.
Additional div
props are passed to the primitive
radix accordion root
component and are not listed.
AccordionItem
An accordion item section containing heading and collapsible content.