Status
Inline alert
An inline alert is a short message in the flow of a page, next to what it is about, that says something is late, done, worth knowing or broken, and stays until that changes.
Designed, coming to kanso-ui
Anatomy
- Container: a soft tonal fill,
radius-md. - Icon, 20 px: names the tone.
- Lead, bold (
k-alert__title): the situation in a word or a short sentence. - Text: the detail, after the lead.
- Action, optional (
k-alert__action): one button that fixes it.
This is Spectrum's in-line alert pattern: icon, bold lead, then plain text. A person who reads only the lead still knows what happened.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-alert | gap | 10px |
padding | 12px 16px 12px 12px | |
border-radius | 12px (radius-md) | |
font | 400 14px/20px font-plain | |
min-width | 0 |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
caution | --kui-color-caution | #b25b00 | #ffb870 |
caution-soft | --kui-color-caution-soft | #ffe7cc | #4a2a00 |
on-caution-soft | --kui-color-on-caution-soft | #5c2e00 | #ffddb3 |
positive-soft | --kui-color-positive-soft | #ddf2e2 | #123a20 |
on-positive-soft | --kui-color-on-positive-soft | #0b3a1b | #c6f2d2 |
accent-soft | --kui-color-accent-soft | #e9e9e9 | #2b2b2b |
on-accent-soft | --kui-color-on-accent-soft | #1a1a1a | #ececec |
critical | --kui-color-critical | #b3261e | #f2b8b5 |
critical-soft | --kui-color-critical-soft | #fcdedc | #4d1512 |
on-critical-soft | --kui-color-on-critical-soft | #5f0e0a | #ffdad6 |
radius-md | --kui-radius-kanso-md | 12px | 12px |
size-icon-md | --kui-sizing-kanso-icon-md | 20px | 20px |