Toast vs Snackbar vs Alert
Three ways to say "give the user a heads-up"
The action is done and I want to acknowledge it. Which one?
Comparison table
| Pattern | Can carry an action | How long it stays | Blocks the user | Typical use |
|---|---|---|---|---|
| Toast轻提示 | No | Disappears after 2–3s | No | "Saved", "Sent" |
| Snackbar带操作提示条 | Yes (undo / retry) | 5–10s | No | "Deleted · Undo" |
| Alert警示框 | Usually | Stays until dismissed | Sometimes (Alert Dialog) | Errors, risks, things to handle |
← Swipe to see the full table
The demos, side by side
Toast
轻提示How to decide: Pure confirmation, nothing follows
Snackbar
带操作提示条Currently: 3
How to decide: Tells the user they can change their mind
Alert
警示框Email already registered
Use a different address, or sign in to your existing account.
Your cloud backup is full. Clear some space to keep backing up.
How to decide: The kind that cannot be ignored
Decision rule
- you just need to confirm successuse a Toast
- you want the user to be able to undo what they just diduse a Snackbar
- the user has to deal with the problem (something broke, something is at risk)use an Alert (an Alert Dialog when it is severe)
Toast and Snackbar get mixed up constantly. One question decides it: does the user need to tap anything? If not, it is a Toast.