Accordion

Collapsible content sections

Accordions let users expand and collapse content sections.

Basic Accordion

This content is hidden until the accordion is expanded.

You can include any content here: text, code, images, or other components.

<Accordion title="Click to expand">

  This content is hidden until the accordion is expanded.

  You can include any content here: text, code, images, or other components.

</Accordion>

With Description

Add a subtitle with the description prop:

Documentation for authentication API endpoints goes here.

<Accordion title="API Reference" description="Authentication endpoints">

  Documentation for authentication API endpoints goes here.

</Accordion>

Default Open

Start expanded with defaultOpen:

This accordion starts in the open state.

<Accordion title="Already Expanded" defaultOpen>

  This accordion starts in the open state.

</Accordion>

With Icon

Configuration options and settings.

<Accordion title="Settings" icon="gear">

  Configuration options and settings.

</Accordion>

Accordion Group

Group related accordions together:

Introduction and setup instructions.

Configuration options and settings.

Common issues and solutions.

<AccordionGroup>
  <Accordion title="Getting Started">

    Introduction and setup instructions.

</Accordion>
  <Accordion title="Configuration">

    Configuration options and settings.

</Accordion>
  <Accordion title="Troubleshooting">

    Common issues and solutions.

</Accordion>
</AccordionGroup>

Properties

stringrequired

Accordion header text.

string

Subtitle displayed below the title.

string

Font Awesome icon name (e.g., "gear", "settings").

stringdefault: light

Icon style variant: light, regular, or solid.

booleandefault: false

Start in expanded state.