Feedback
Snackbar
A snackbar is a brief message near the bottom of the screen that confirms what the person just did and, at most, offers one way to undo it.
In kanso-ui as Snackbar
Anatomy
- Container:
ink,radius-md,shadow-2; 48 px high, up to 560 px wide. It floats over the content. - Message: one line, in the past tense.
- Action, optional: a text button in
accent-on-ink, such as "Undo". - Close, optional: an icon button (
close).
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-snackbar | gap | 12px (space-md) |
min-height | 48px | |
padding | 6px 6px 6px 16px | |
border-radius | 12px (radius-md) | |
box-shadow | shadow-2 | |
font | 400 14px/20px font-plain | |
max-width | 560px |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
accent-on-ink | --kui-color-accent-on-ink | #fafafa | #121212 |
shadow-2 | --kui-shadow-kanso-2 | 0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1) | 0px 4px 16px 0px rgba(0, 0, 0, 0.6) |
radius-md | --kui-radius-kanso-md | 12px | 12px |
space-md | --kui-spacing-kanso-md | 12px | 12px |
--k-motion-medium | its own value | — | — |
--k-ease-enter | its own value | — | — |
--k-ease-exit | its own value | — | — |