Accordion
A collapsible content container that allows users to show and hide sections of related content.
API Reference
Usage
Properties
The Accordion
component extends the Bits UI <Accordion>
component. Find the full list of available properties in the official Bits UI documentation.
AccordionHeader
Prop | Type | Default |
---|---|---|
icon | ComponentType | - |
AccordionContent
Prop | Type | Default |
---|---|---|
indent | boolean | false |
Examples
Default
Icon support
Add an icon
prop to the AccordionItem
component to display a leading icon in the header.
When using icon, you can enable content indentation with the indent
prop on AccordionContent
to align the content with the header text.
Disabled
Disable interaction for the entire accordion by adding the disabled
prop to the Accordion
component.
Disabled item
Disable interaction for a specific item by adding the disabled
prop to the AccordionItem
component.