Content
Badge
A small pill of words that states a status or a count, such as "Done" or "1 h 32 late"; people read it, they do not press it.
In kanso-ui as Badge
Anatomy
- Container: a 26px pill; 20px for a count.
- Icon, optional: 16px, before the words.
- Words: one to three, 12px at weight 700 (11px in a count), in sentence case.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-badge | height | 26px |
padding | 0 10px | |
border-radius | 999px (radius-pill) | |
gap | 4px | |
font | 700 12px/16px font-plain | |
k-badge--count | min-width | 20px |
height | 20px | |
padding | 0 6px | |
font-size | 11px |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
container | --kui-color-container | #e9e9e9 | #2b2b2b |
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
accent | --kui-color-accent | #1a1a1a | #ececec |
on-accent | --kui-color-on-accent | #fafafa | #121212 |
accent-soft | --kui-color-accent-soft | #e9e9e9 | #2b2b2b |
on-accent-soft | --kui-color-on-accent-soft | #1a1a1a | #ececec |
positive-soft | --kui-color-positive-soft | #ddf2e2 | #123a20 |
on-positive-soft | --kui-color-on-positive-soft | #0b3a1b | #c6f2d2 |
caution-soft | --kui-color-caution-soft | #ffe7cc | #4a2a00 |
on-caution-soft | --kui-color-on-caution-soft | #5c2e00 | #ffddb3 |
negative-soft | --kui-color-negative-soft | #fce3dc | #4a1a10 |
on-negative-soft | --kui-color-on-negative-soft | #5a1a0a | #ffdad0 |
critical-soft | --kui-color-critical-soft | #fcdedc | #4d1512 |
on-critical-soft | --kui-color-on-critical-soft | #5f0e0a | #ffdad6 |
radius-pill | --kui-radius-kanso-pill | 999px | 999px |
size-icon-sm | --kui-sizing-kanso-icon-sm | 16px | 16px |
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 |