Illustrative Mathematics® Learn Math for life
Components/Accordions

Accordion

A parent wrapper component that manages one or more collapsible accordion items

done

Overview

The Accordion component is the parent wrapper for a collection of collapsible accordion items. It optionally provides an "Expand/Collapse All" button that allows users to open or close all items at once.

Subcomponents

The Accordion uses a compound component pattern with the following subcomponents:

Examples

Basic Usage

By default, only one accordion item can be open at a time (single mode).

Multiple Items Open

Use type="multiple" to allow multiple accordion items to be open simultaneously.

With Toggle All Button

Use showToggleAll to display an "Expand/Collapse All" button. When enabled, the accordion automatically uses type="multiple".

Props

PropTypeDefault
showToggleAll?
boolean
false
type?
"single" | "multiple"
"single"
className?
string
-

Import

import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@im/integral/components/styled';