Toast and Alert Messages
Level 4 · Layers, messages and waiting
How an app talks back: toasts that leave by themselves, alert banners that stay, and empty states. Why how long a message stays matters most.
Course contentsLesson 11 of 14
Level 1 · Parts and their states
Level 2 · Getting answers in
Level 3 · Finding your way
Level 4 · Layers, messages and waiting
Level 5 · Showing many things
After this lesson you can
- Choose a toast or an alert banner
- Write a useful empty state
- Keep key news on screen long enough
10 mincovers 3 glossary entries
Worth reading first: Modals, Drawers and Popovers
How long each kind of message should stay
The main difference between app messages is how long they stay on the screen. A toast pops up and leaves by itself, often after a few seconds. On Android, a short toast lasts 2 seconds and a long one 3.5. An alert banner stays until someone closes it. An inline error stays until the field is fixed.
A toast notification is right for news that does not need an answer. Message sent. Photo saved. If the user misses it, nothing is lost. Many apps add an Undo button to the toast, which is a kind way to handle a mistake without asking are you sure first.
A toast is wrong for anything the user must read. It may leave before a slow reader finishes, and people looking at another part of the screen never see it. A screen reader may not read it out at all unless it is built with care.
An alert banner is a strip on the page with an important message, such as your card expires in 6 days. It stays until it is closed or the problem is fixed. Use it for news that matters to the whole page, not to one field.
An empty state is what a screen shows when there is nothing in it yet. A new inbox, an empty cart, a search with no results. A blank white area looks broken. A good empty state says why it is empty and offers the next step, such as a button to add your first item.
Each message should also use more than color to say what it is. A red strip and a green strip look the same to many color blind users. Add an icon and a clear word, such as Error or Done, at the start of the message.
The common mistake is to send important news in a toast because it looks neat. Payment failed should never vanish after two seconds. If the user must act on it, keep it on the screen until they do.
Fire all three
Your card expires in 6 days.
Toast: four seconds. Banner: until dismissed. Red line: until the box is fixed.
Fire all three. Only one of them decides for itself when to leave.
Show a banner, a field error and a toast. Only one of them decides for itself when to go away.
Worked example
A to-do app fills its empty screen
A to-do app showed a blank white screen to new users. In the first week, about half of them closed the app without adding a task.
The team added a short line, Nothing to do yet, and a button reading Add your first task. Far more new users added a task on day one.
The words for this lesson3
Check yourself
Why is a toast the wrong place for a payment failed message?
Finished this lesson?
Marking it complete also marks its 3 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.