Toast
A brief message about something that just happened. It floats over the page and disappears by itself.
01Anatomy
5 parts. Select a number or a name to see what each part does.
01 · Container
The floating box, usually at the bottom of the screen, above the content.
- Required
- Yes
- Recommended
- Always in the same place, so people learn where to look.
02 · Status icon
Says at a glance whether it went well or not.
- Required
- No
03 · Message
What happened, in a few words: “Project saved”.
- Required
- Yes
- Recommended
- One line, past tense, no “Success!”. If it needs two sentences, it’s not a toast.
04 · Action
One quick action on what just happened: Undo, Retry, View.
- Required
- No
- When
- At most one. The action must also be reachable some other way, because the toast goes away.
05 · Dismiss
Closes the toast before its time.
- Required
- Only in some cases
- When
- Needed when the toast has an action or stays until closed.
Example spacing, measured on this drawing (16 px = 1 em). A common implementation, not a rule: values change from system to system. W and H are width and height, as in Figma: Hug follows the content, Fill takes the space of the parent.
Spacing is measured on the normal view: switch back to Normal to show it.
02Structure
- Toastcomponent setauto layouthorizontalhugmin H 48padding V 8L 16R 12gap 10radius 8
- Iconinstanceboolean
- Messagetext
- ActioninstanceButton / Ghostboolean
- DismissinstanceIcon Buttonboolean
| Property | Type | Values |
|---|---|---|
| Type | Variant | NeutralSuccessError |
| Icon | Boolean | truefalse |
| Action | Boolean + Text | “Undo · Retry” |
| Dismiss | Boolean | truefalse |
| Message | Text | “Project saved” |
Show it in the prototype with an overlay at the bottom and an After delay trigger to close it.
03States
A toast with an error that needs fixing should stay until closed, or be an alert in the page.
04Variants
05Responsive behaviour
Bottom left or centre, as wide as the message, away from the main actions.
Full width at the bottom, above the tab bar and the keyboard, never over the button just pressed.
There is no single correct anatomy: names, variants and properties differ from one design system to another. These are common structural models distilled from established design systems and accessibility guidance.
Proven methods for designing interfaces with AI. Every two weeks, in Italian.
Subscribe