- Android
- iOS
- Web
Accordion
Expand and collapse related sections within a single view.
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| items | readonly T[] | Required | Panels with a title, message, and optional id and disabled flag. |
| type | "single" | "multiple" | Optional | How many panels can be open at once. Default: single. |
| defaultExpanded | boolean | Optional | Open the first enabled panel initially when expansion is uncontrolled. |
| expanded | boolean | Optional | Control whether any panel is open. Opening selects the first enabled panel if no selection is saved. |
| onExpandedChange | ((expanded: boolean) => void) | Optional | Called when a user action opens the first panel or closes the last one. |
| variant | "default" | "surface" | Optional | Surface gives each panel its own background and border. Default: default. |
| className | string | Optional | |
| itemClassName | string | Optional | |
| triggerClassName | string | Optional | |
| contentClassName | string | Optional | |
| indicatorClassName | string | Optional |