Single accordion
I am an Accordion.
I am an Accordion.
You can put any content in here, including other components, like code:
HelloWorld.java
Accordion example
Accordion Groups
Group related accordions together using<AccordionGroup>
. This creates a cohesive section of accordions that can be individually expanded or collapsed.
Getting started
Getting started
You can put other components inside Accordions.
HelloWorld.java
Advanced features
Advanced features
Add icons to make accordions more visually distinct and scannable.
Troubleshooting
Troubleshooting
Keep related content organized into groups.
Accordion Group Example
Properties
Title in the Accordion preview.
Detail below the title in the Accordion preview.
Whether the Accordion is open by default.
The icon to display.Options:
- Font Awesome icon name
- Lucide icon name
- JSX-compatible SVG code wrapped in curly braces
- URL to an externally hosted icon
- Path to an icon file in your project
- Convert your SVG using the SVGR converter.
- Paste your SVG code into the SVG input field.
- Copy the complete
<svg>...</svg>
element from the JSX output field. - Wrap the JSX-compatible SVG code in curly braces:
icon={<svg ...> ... </svg>}
. - Adjust
height
andwidth
as needed.
The Font Awesome icon style. Only used with Font Awesome icons.Options:
regular
, solid
, light
, thin
, sharp-solid
, duotone
, brands
.