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
Variants and sizes
- Message only:
k-snackbarwithk-snackbar__text. - With an action:
k-btn k-btn--textinside. - With close:
k-iconbtninside, when there is no action or the message stays longer.
States
- Entering: rises into place over
--k-motion-mediumwith--k-ease-enter; underprefers-reduced-motionit only fades in. - Showing: at least 6 s; with an action, at least 10 s. The timer pauses while the pointer is over it or focus is inside it.
- Leaving: with
--k-ease-exit, when the time is up, the action is used or it is closed. A new snackbar replaces the one showing. - Its buttons show hover and pressed as state layers, and focus as a ring in
accent-on-ink.
Do and don’t
Do
Say what happened, in the past tense: "Weekly review marked as done".
Offer Undo for any change that can be reversed.
Don’t
Add a second action or a second line.
Stack snackbars.
Cover the navigation bar or the FAB: sit above them.
Use it for an error that needs a decision.
What you provide
- The message, an optional action label and what it does, whether it can be closed, and how long it stays.