Components
ExpandButton
Small square toggle button for expand/collapse actions; shows Plus when
collapsed and Minus when expanded, and reflects state via aria-expanded.
Import from "@instruments/materia-ui/components/expand-button".
This is an icon-only control, so pass an aria-label (or aria-labelledby)
describing the action (e.g. "Expand row") - without it screen readers
announce an unlabelled button.
Usage
Best practices
Always pass an
aria-label(e.g. "Expand row") - it's icon-only, so without one screen readers announce an unlabelled button.Drive the icon and
aria-expandedwith theexpandedprop; setexpandedIcon/collapsedIcononly to override the default Minus/Plus pair.
Props
ExpandButton
PlusMinusMorphIcon
Also exports
- type
ExpandButtonProps - type
PlusMinusMorphIconProps
Composition
Used by