What is a toast?
A toast is a brief, non-blocking message that appears on top of the screen, confirms what just happened, and disappears automatically. Unlike a modalModalA window that appears on top of the page and blocks the content behind it until it is closed.Open in glossary →, it doesn’t stop the user. They can ignore it and carry on.
You’ll usually see one used to:
- Confirm an action: Link copied, Added to bag, Settings saved.
- Offer a quick way back: Conversation archived · Undo, Item removed · Undo.
- Report a small, temporary problem with a fix: Couldn’t send. Retry.
Anatomy
- 1
Container
A small dark (or light) surface with rounded corners. It floats above the content but does not block it.
- 2
Message
One short sentence about what just happened: "Conversation archived". Max two lines.
- 3
Action (optional)
One short text button, usually Undo, Retry or View. Never "OK" or "Dismiss".
- 4
Close icon (optional)
Lets the user dismiss it early. Common on web toasts and long snackbars.
- 5
Placement
Above the bottom navigation and the floating button, never on top of them. Web: a corner or top/bottom center.
- 6
Timer (invisible)
Hides it automatically after a few seconds. Longer when there is an action.
How it differs from similar components
| Component | Blocks the user? | Disappears by itself? | Typical use |
|---|---|---|---|
| Toast / snackbar | No | Yes, after a few seconds | Feedback on an action, optional Undo |
| Banner (in-page) | No | No, until fixed or dismissed | Ongoing status: “You’re offline”, “Card expires soon” |
| Inline message | No | No | Form errors, next to the field that has the problem |
| Dialog / alert | Yes | No | Decisions and errors the user must deal with |
| Push notificationPush notificationA message an app sends to the device that appears even when the app is closed.Open in glossary → | No | Goes to the notification center | Messages from outside the app, even when it’s closed |
Dev note
On Android, a Toast is a specific system component (plain text, no buttons) and a Snackbar is the Material component with an optional action. iOS has no native toast at all: apps use custom banners or HUDs. On the web, people say toast, notification, flash message or alert. In a bug report, describe what you saw (“the snackbar at the bottom”).
Designs & variants
Tap the buttons inside each screen. Watch how long each message stays, where it appears, and what you can do with it.
Share recipe
Toast
AndroidThe system Toast: a small pill near the bottom with plain text. No buttons, can't be tapped or swiped away. Android 12+ shows the app icon.
2 s (short) or 3.5 s (long)
Inbox
- Lisbon trip itinerary
- Your order has shipped
- Team lunch on Friday?
- Invoice #1042
- Weekly running summary
Snackbar with action
Android · Material 3One action (here Undo). Appears above the bottom navigation and pushes the floating button up. Only one at a time: a new one replaces the old one.
4–10 s, longer with an action
Midnight Drive
Lumen · Album
HUD
iOSiOS has no native toast API. Some Apple apps have used a centered square like this for quick confirmations; third-party apps copy it or build their own.
About 1.5–2 s
Trail running shoes
€119.00 · Size 42
In-app banner
iOSA custom banner that slides down from the top, styled like a notification. Can hold one action (View). Hover or focus pauses it here.
About 4 s
Settings
Toast stack
WebWeb apps usually stack toasts in a corner. Limit the stack (here 3), pause the timer on hover or focus, and give every toast a close button.
5 s for success, errors stay
Chat with Ana
Two-line snackbar with close
Android · WebLonger messages wrap to two lines and the action moves below the text. A snackbar that waits for the user needs a close icon.
Stays until dismissed or Retry
How long should it stay?
There’s no single number, but these are good rules to test against:
| Situation | Typical duration |
|---|---|
| Android system Toast | 2 s (LENGTH_SHORT) or 3.5 s (LENGTH_LONG), fixed by the system |
| Short confirmation, no action | About 4–6 s |
| With an action (Undo, Retry) | Longer, around 6–10 s, or until dismissed. Jetpack Compose’s Material 3 snackbar stays until dismissed by default when it has an action |
| Material snackbar presets | Material’s guidance is roughly 4–10 s. The built-in short and long presets are about 4 s and 10 s in newer Android apps and much shorter in older ones (about 1.5 s and 2.75 s), so check which one the app uses |
| Error that needs the user | Don’t auto-hide at all, or don’t use a toast |
The longer and more important the message, the longer it should stay. On the web, the timer should also pause while the pointer or keyboard focus is on the toast, so it doesn’t vanish under the cursor.
The Undo pattern
Undo is what makes toasts powerful: instead of asking “Are you sure?” in a dialog, the app does the action immediately and offers to reverse it. That’s faster for everyone, but it’s only safe if Undo really works. Testers check:
- Undo restores exactly the right item, in the same place, with the same state (read/unread, starred, labels).
- Undo works after several actions in a row: archive two emails, then undo the last one.
- The server agrees. After Undo, a refresh or another device still shows the item.
- Undo is reachable in time with large text, a screen readerScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary → or a slow hand.
- Nothing happens twice. Tapping Undo twice doesn’t restore two copies.
Check this part
What makes a toast different from a dialog?
You archive two emails and press Undo on the latest snackbar. The first email comes back instead. What kind of bug is this?
A snackbar has an Undo action. How long should it stay compared with a plain confirmation?