Toast vs. Alert
A toast is a short message that does not stop the task. An alert stays or interrupts because it must not be missed.
Use a toast to confirm a finished action. Use an alert for a failure, danger, or choice that needs attention now.
See what each pattern does
Try each example. Then read about the job it is made to do.
Toast
A toast is a short status message. It doesn't block the page and usually leaves on its own.
After autosave, “Changes saved” appears quietly in a corner and is announced once.
- Use it when
- Use it for a low-risk confirmation that doesn't need an answer.
- Do not use it when
- Never use it for an important error or instructions people must read or follow.
- Name used in code
role="status"
macOS Alert
A macOS Alert is a system dialog for an important choice, failure, or condition. A person must notice it and answer.
Closing an unsaved document asks whether to Save, Cancel, or discard changes. The safest default is clear.
- Use it when
- Use it only when an important condition needs an answer or choice before the current task can safely go on.
- Do not use it when
- Avoid routine success messages, recoverable inline validation, and confirmations for reversible actions. Repeated alerts train people to dismiss them unread.
- Name used in code
AppKit NSAlert / SwiftUI alert
Quick comparison
| UI pattern | Best for | Not for | Name used in code |
|---|---|---|---|
| Toast | Use it for a low-risk confirmation that doesn't need an answer. | Never use it for an important error or instructions people must read or follow. | role="status" |
| macOS Alert | Use it only when an important condition needs an answer or choice before the current task can safely go on. | Avoid routine success messages, recoverable inline validation, and confirmations for reversible actions. Repeated alerts train people to dismiss them unread. | AppKit NSAlert / SwiftUI alert |
Before you ship
- 01
Write down what the person needs to do.
- 02
Test the keyboard, focus, touch, zoom, loading, empty, and error states.
- 03
Make sure people can get the same information without hover or motion.
- 04
Test with real content on both small and large screens.
Comparison request you can copy
Copy this when your team needs help choosing between the patterns.
Choose the best pattern from Toast, macOS Alert for our real user flow. Use this rule: A toast is a short message that does not stop the task. An alert stays or interrupts because it must not be missed. Write down the task, amount of content, and cost of stopping the flow. Check keyboard, touch, loading, error, and reduced-motion behavior. Explain your choice, then build the smallest accessible version with the project's design system.