Accordion
A vertically stacked set of interactive headings that each reveal a section of content.
Installation
Usage
<Accordion Value="@(["item-1"])">
<AccordionItem Value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
</AccordionItem>
</Accordion>Composition
Use the following composition to build an Accordion:
Accordion
├── AccordionItem
│ ├── AccordionTrigger
│ └── AccordionContent
└── AccordionItem
├── AccordionTrigger
└── AccordionContentBasic
A basic accordion that shows one item at a time. The first item is open by default.
Multiple
Use the Multiple parameter to allow multiple items to be open at the same time.
Disabled
Use the Disabled parameter on AccordionItem to disable individual items.
Borders
Add border to the Accordion and border-b last:border-b-0 to the AccordionItem to add borders to the items.
Card
Wrap the Accordion in a Card component.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
API Reference
Accordion
Other attributes are passed to the element it renders.
AccordionContent
Other attributes are passed to the element it renders.
AccordionItem
Other attributes are passed to the element it renders.
AccordionTrigger
Other attributes are passed to the element it renders.