Description
- An accordion is used to group, hide, and reveal content using progressive disclosure.
- When closed, an accordion shows top-level information only.
- A user can open the accordion and quickly access more information.
Component preview
No live controls configured for this component.
Anatomy
Anatomy
Types
Standard
Simple
Size
- The accordion height adjusts to the content in the heading and content areas.
- The default accordion width is 100 percent of the accordion's parent container.
- Standard accordion is available in S size and M size.
- Simple accordion is available in S size, M size and L size.
States
Component-specific states
Closed
Open
Color mode
Light
Dark
Variations
Grouped
Subtitle
Detailed icon
No padding
Examples
- Accordions can be embedded into containers like Tile, Card, and Sidebar.
- Top and bottom dividers can be removed if needed to fit better with the design of the parent container.
Tile
Card
Sidebar
Best practices
- Use accordions sparingly.
- Having too much content in an accordion makes it hard to find information.
- Having too many accordions on a page makes it hard to navigate the page.
- Keep accordions open or closed until a user interacts with them. Consider whether 1 or more accordion sections can be open at the same time.
- When the accordion content is longer than the viewport, display a vertical scrollbar for the whole accordion.
- Never allow content to scroll vertically on individual content panels.
- Never allow content to scroll horizontally on the whole accordion or individual content panels.
- Avoid putting important controls (for example, a primary button) in an accordion.
- Avoid putting accordions within accordions.
- Make the title short, clear, and descriptive.
- Use paragraphs and subheadings for content if necessary.
Dos and don'ts
Do