Types
Accordion
Use an Accordion to reduce page length or scrolling by the user when a single content block would require too much space.
Expand
Use an expand to reduce page length or scrolling by the user when a block of text would require too much space.
Collapsible state
CollapsibleTrigger also exposes the open/close state via render props (or context for advanced usage).
Props
Collapsible| Name | Type | Description |
gradient | ResponsiveValue<TLengthStyledSystem, Required<Theme<TLengthStyledSystem>>> | - |
collapsedHeight | TLengthStyledSystem | Height (in px if number) when panel is closed |
animateOpacity | boolean | Adds a fade effect |
Accessibility
- Ensure your CollapsibleTrigger is focusable
- An
idis generated if one is not provided CollapsibleTriggeraddsaria-controlsthat points to it's associated panelCollapsiblePaneladdsaria-labeledbythat points to it's associated trigger