TrademarkTrademark
Ctrl k
Search docs...
Components

Accordion

Last update: March 8, 2025
The Accordion component provides an expandable/collapsible container that helps organize content into digestible sections, saving valuable screen space while keeping related information accessible.

Basic Usage

Accordions are perfect for FAQs, product specifications, or any content that benefits from progressive disclosure.

Customization Options

The Accordion component supports various customization options:
  • Size: Control the overall size with the size prop (s, m, or l)
  • Icon: Change the default chevron icon with the icon prop
  • Radius: Adjust corner rounding with the radius prop
  • Initial state: Control whether it's initially open with the open prop

Custom Syntax

Magic Docs provides an AccordionGroup component for creating groups of accordions with consistent styling: Here's an example of the AccordionGroup in action:

Accessibility Considerations

Our Accordion component follows WAI-ARIA best practices:
  • Uses appropriate ARIA attributes for screen readers
  • Supports keyboard navigation (Tab, Enter, Space)
  • Maintains focus management during interactions
Accordions are a powerful way to organize complex information while keeping your UI clean and focused.
Edit this page on GitHub
TrademarkTrademark
Launch your docs with Once UI
Social
GitHub