Toast
A toast confirms what you just did when the result is out of view or can still be taken back. It appears at the bottom of the window and leaves by itself.
Example
- Ramesh ThapaWelder, SplitOffer
- Sita GurungCare assistant, ZagrebOffer
- Joel SantosElectrician, RijekaApplied
- Harpreet SinghWarehouse operative, ZagrebApplied
- Bikash RaiWelder, SplitInterview
When to use it
Use a toast when what you just did moved out of view, such as a candidate who left the list, or when it can still be undone.
Skip it when the change happens in front of you. An interview date that saves in its cell confirms itself.
News from someone else, such as a new application, is a notification. A condition of the page you are on, such as being offline, is an inline message. A choice that must come first, such as withdrawing an offer, is a dialog.
Anatomy
One sentence and at most one action, side by side on one line. The action is blue text. When you point at it, it turns the color of the message.
- Background
- Raised glass
- --glass-fill-raised
- Shadow
- Raised
- --elevation-3
- Corner radius
- 16 px
- --radius-2xl
- Height
- 44 px at least
- Padding
- 10 px by 16 px
- --space-4
- Gap before the action
- 16 px
- --space-4
- Width
- As wide as its words, at most the window less 24 px
- Message
- 13 px on 20 px, weight 400
- --type-caption
- Action
- The message's type at weight 700, brand blue
- --brand-blue
- Action target
- 24 px high, 44 px on touch
- Position
- Centered, 24 px above the window's bottom
- --space-6
- Layer
- Above dialogs and popovers
- --layer-toast
Tones
A neutral toast reports a result. An error toast reports something you did that did not go through: its words and its action turn red, and it stays until you act on it or press Escape.
There is no green toast, because a result that worked needs no color. A warning is a condition of the page and belongs in an inline message.
Behavior
One toast shows at a time. A new one replaces it, unless the toast on screen still offers Undo: that one keeps its place until its time runs out.
One action on many people gets one toast: 12 candidates archived.
The timer stops while your pointer rests on the toast or focus is inside it.
Undo is also on the item, so a missed toast loses nothing.
On a phone the toast sits above the bottom navigation. While a sheet is open, it moves to the top.
- Time on screen
- NaN ms
- Entrance
- Rises undefined px and grows from NaN percent of its size as it fades in, undefined ms
- --ease-standard
- Exit
- Fades out
- --duration-fast
- Reduced motion
- Appears and leaves without moving
Content
Say what happened, in the past tense, and name the thing: Candidate archived, Offer sent to Ramesh Thapa.
The action is one verb that answers the message: Undo, Open, Restore, Try again.
Accessibility
The screen keeps one polite live region from the moment it loads and announces the toast through it once. The toast has no live region of its own, so nobody hears the message twice.
A toast does not take focus. Its action is a real button: Tab reaches it at the end of the page, Enter runs it, and Escape closes the toast while focus is inside.
Permitted and not permitted
Permitted
Candidate archived, with Undo
It says what happened and how to bring it back.
Not permitted
Saved successfully!
The field already shows the saved value.
A toast that asks: Withdraw this offer?
A decision that cannot be undone needs a dialog that waits for you.
Undo that exists only in the toast
Once the toast leaves, the way back is gone. Offer it on the item too.