Content
Avatar
An avatar marks a person with their initial in a circle, or a team with its initial in a rounded square, wherever it matters who did something.
In kanso-ui as Avatar
Anatomy
- Shape: a circle for a person, a rounded square (
radius-sm) for a team. - Fill: the person's one style (see Variants).
- Initial: one letter in the voice face, Roboto Serif.
- Ring, in stacks only: 2px of the ground colour around each avatar, set by
--k-ring(paperby default). - Persona text: the name (
k-persona__name) and a meta line (k-persona__meta).
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-avatar | width | 36px (size-avatar-md) |
height | 36px (size-avatar-md) | |
border-radius | 50% | |
font | 400 15px/1 font-voice | |
k-avatar--sm | width | 28px (size-avatar-sm) |
height | 28px (size-avatar-sm) | |
font-size | 13px | |
k-avatar--lg | width | 56px (size-avatar-lg) |
height | 56px (size-avatar-lg) | |
font-size | 22px | |
k-avatar--group | border-radius | 8px (radius-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 |
accent-soft | --kui-color-accent-soft | #e9e9e9 | #2b2b2b |
on-accent-soft | --kui-color-on-accent-soft | #1a1a1a | #ececec |
ink-muted | --kui-color-ink-muted | #5c5c5c | #b3b3b3 |
paper | --kui-color-paper | #fafafa | #121212 |
surface | --kui-color-kanso-surface | #ffffff | #1c1c1c |
size-avatar-sm | --kui-sizing-kanso-avatar-sm | 28px | 28px |
size-avatar-md | --kui-sizing-kanso-avatar-md | 36px | 36px |
size-avatar-lg | --kui-sizing-kanso-avatar-lg | 56px | 56px |
radius-sm | --kui-radius-kanso-sm | 8px | 8px |
space-md | --kui-spacing-kanso-md | 12px | 12px |
font-voice | --kui-typography-font-family-voice | 'Roboto Serif', 'Iowan Old Style', Georgia, serif | 'Roboto Serif', 'Iowan Old Style', Georgia, serif |
font-plain | --kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif |