Overview
A component that renders SVG icons. Supports theme color tokens and size tokens.
Sizes
| Size | Value | Use Case |
|---|
extraSmall | 12px | Inline icons, inside tags |
small | 16px | Small buttons, inside input fields |
medium | 20px | Default icon size |
large | 24px | Navigation, header icons |
Colors
Icon colors use semantic color tokens:
iconDefaultDefault — Default icon
iconDefaultDisabled — Disabled icon
iconDangerDefault — Danger/error icon
iconBrandDefault — Brand icon
iconBrandOnBrand — Icon on brand background
Props
| Prop | Type | Default | Required | Description |
|---|
size | 'extraSmall' | 'small' | 'medium' | 'large' | 'medium' | No | 12, 16, 20 or 24 px |
name | IconName | - | Yes | Icon to draw |
color | IconColorToken | TextColorToken | 'iconDefaultDefault' | No | Icon color token |
rotate | number | - | No | Rotation in degrees. Changes animate |
aria-hidden | boolean | 'true' | 'false' | - | No | Hide from screen readers when the text next to it already says the same thing |
Usage
By default an icon is announced by its name (role="img", aria-label = name). Pass aria-hidden="true" when nearby text or the button's own label already says the same thing, so screen readers do not read it twice.
Specification
base
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | root | color | $color.icon.default.default |
size=extraSmall
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | root | width | $size.icon.extraSmall |
| enabled | root | height | $size.icon.extraSmall |
size=small
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | root | width | $size.icon.small |
| enabled | root | height | $size.icon.small |
size=medium
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | root | width | $size.icon.medium |
| enabled | root | height | $size.icon.medium |
size=large
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | root | width | $size.icon.large |
| enabled | root | height | $size.icon.large |