Icon
Wrapper for SVG icons with standardized sizing and accessibility attributes.
Example
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | No | Icon size (16px, 20px, 24px) |
label | string | — | No | Accessible label — sets role="img" and aria-label. If absent, icon is aria-hidden. |
Accessibility
- aria-hidden="true" when no label (decorative icon)
- role="img" with aria-label when label provided (meaningful icon)
- Child SVG inherits size from wrapper
Related Tokens
--icon-size-sm--icon-size-md--icon-size-lg