Actions
Icon button
A round button that shows only an icon, used for familiar actions where space is short, such as Search in the app bar or Next day beside a date.
In kanso-ui as IconButton
Anatomy
- Container: a 48px circle, 32px in the small size.
- Icon: 24px, or 20px when small, from Material Symbols Rounded.
- State layer: the icon colour laid over the circle on hover and press.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-iconbtn | width | 48px (size-control-lg) |
height | 48px (size-control-lg) | |
padding | 0 | |
border | 0 | |
border-radius | 50% | |
k-iconbtn--outline | border | 1px solid #8a8a8a (outline) |
k-iconbtn--sm | width | 32px (size-control-sm) |
height | 32px (size-control-sm) |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
container | --kui-color-container | #e9e9e9 | #2b2b2b |
outline | --kui-color-outline | #8a8a8a | #8c8c8c |
focus-ring | --kui-color-focus-ring | #1a1a1a | #ececec |
size-control-lg | --kui-sizing-kanso-control-lg | 48px | 48px |
size-control-sm | --kui-sizing-kanso-control-sm | 32px | 32px |
size-icon-lg | --kui-sizing-kanso-icon-lg | 24px | 24px |
size-icon-md | --kui-sizing-kanso-icon-md | 20px | 20px |
state-hover | --kui-state-layer-opacity-kanso-hover | 0.08 | 0.08 |
state-pressed | --kui-state-layer-opacity-kanso-pressed | 0.12 | 0.12 |