Anatomy

  1. Container: a soft tonal fill, radius-md.
  2. Icon, 20 px: names the tone.
  3. Lead, bold (k-alert__title): the situation in a word or a short sentence.
  4. Text: the detail, after the lead.
  5. 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.

ClassPropertyValue
k-alertgap10px
padding12px 16px 12px 12px
border-radius12px (radius-md)
font400 14px/20px font-plain
min-width0

Tokens used

Design tokenIn kanso-uiLightDark
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-md12px12px
size-icon-md--kui-sizing-kanso-icon-md20px20px