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
Variants and sizes
| Tone | Class | Icon | For |
|---|---|---|---|
| Caution | k-alert--caution | warning | Late, needs attention |
| Positive | k-alert--positive | check_circle | Done, money in |
| Info | k-alert--info | info | Worth knowing, on accent-soft |
| Critical | k-alert--critical | error | Failed, or blocked by an error |
States
The alert has no interactive states of its own; its action follows Button (hover and pressed state layers, focus ring). It appears when the situation starts and goes away, or turns positive, when it ends. The tone never rests on colour alone: the icon's shape and the lead's words say it too.
Do and don’t
Do
Lead with the words that name the situation: "Late", "Couldn't save the file."
Say how to fix it, and give at most one action that does it.
Place the alert next to what it is about.
Don’t
Use critical for money over budget: that is
negativetext in the row, not an alert.Stack more than two alerts: merge them or fix the cause.
What you provide
- The tone, the lead, the text, and optionally the action label and what it does. The icon comes with the tone; swap it only for a closer icon in the same tone.