Skip to content
Bugwise
Menu
UI Components

Toast / Snackbar

A short message that pops up, says what just happened, and disappears on its own. Learn the Android, iOS and web versions, how long they should stay, the Undo pattern, and the timing and stacking bugs testers find.

35–55 min Feedback & overlays iOS · Android · Web Also called: Snackbar, Notification, Flash message

You archive an email and a dark bar slides up from the bottom: “Conversation archived · Undo”. A few seconds later it’s gone. You didn’t have to tap anything, and you could keep working while it was there. That little bar is a toastToastA short, temporary message that appears briefly and disappears on its own, like 'Message sent'.Open in glossary →, called a snackbar in Material DesignMaterial DesignGoogle's design system for Android and the web: the rules for how buttons, tabs, sheets and other components look and behave.Open in glossary →.

Toasts are small, but testers love them. They disappear on a timer, they appear on top of other things, they promise that something worked, and the Undo button has to really undo. Each of those is a place for bugs.

Part Not started

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. 1

    Container

    A small dark (or light) surface with rounded corners. It floats above the content but does not block it.

  2. 2

    Message

    One short sentence about what just happened: "Conversation archived". Max two lines.

  3. 3

    Action (optional)

    One short text button, usually Undo, Retry or View. Never "OK" or "Dismiss".

  4. 4

    Close icon (optional)

    Lets the user dismiss it early. Common on web toasts and long snackbars.

  5. 5

    Placement

    Above the bottom navigation and the floating button, never on top of them. Web: a corner or top/bottom center.

  6. 6

    Timer (invisible)

    Hides it automatically after a few seconds. Longer when there is an action.

How it differs from similar components

ComponentBlocks the user?Disappears by itself?Typical use
Toast / snackbarNoYes, after a few secondsFeedback on an action, optional Undo
Banner (in-page)NoNo, until fixed or dismissedOngoing status: “You’re offline”, “Card expires soon”
Inline messageNoNoForm errors, next to the field that has the problem
Dialog / alertYesNoDecisions 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 →NoGoes to the notification centerMessages 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

Android

The 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 3

One 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

iOS

iOS 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

iOS

A 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

Web

Web 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

See you at 7 at the climbing gym!

Two-line snackbar with close

Android · Web

Longer 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:

SituationTypical duration
Android system Toast2 s (LENGTH_SHORT) or 3.5 s (LENGTH_LONG), fixed by the system
Short confirmation, no actionAbout 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 presetsMaterial’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 userDon’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:

  1. Undo restores exactly the right item, in the same place, with the same state (read/unread, starred, labels).
  2. Undo works after several actions in a row: archive two emails, then undo the last one.
  3. The server agrees. After Undo, a refresh or another device still shows the item.
  4. 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.
  5. Nothing happens twice. Tapping Undo twice doesn’t restore two copies.

Check this part

  1. What makes a toast different from a dialog?

  2. You archive two emails and press Undo on the latest snackbar. The first email comes back instead. What kind of bug is this?

  3. A snackbar has an Undo action. How long should it stay compared with a plain confirmation?

A brief, non-blocking message that confirms an action and disappears on its own, how long it should stay, and how Undo must really undo.

Part Not started

When to use it

A toast is a good choice when:

  • The message is short (one line, two at most) and confirms something the user just did.
  • The user doesn’t need to do anything. If they miss it, nothing bad happens.
  • There is at most one simple action, like Undo or Retry.
  • The action was reversible or already succeeded.

Good and bad uses

Confirm a reversible action

Short, about something the user just did, with a way back.

Errors the user must act on

If they miss it, they think they ordered. A failed payment needs a dialog or an inline message that stays until the user fixes it.

Form errors next to the field

The error stays visible while the user fixes it, right where the problem is.

Validation errors in a toast

Which field? By the time the user scrolls to look, the toast is gone.

One message for a batch

One summary, one Undo.

A pile of toasts

Three identical bars cover the content, and it’s unclear what each Undo would restore.

Check this part

  1. Which message fits a toast best?

  2. A failed payment is reported only in a toast. How should you report it?

Use a toast for short confirmations the user can safely miss, with at most one action; errors to act on and critical information belong elsewhere.

Part Not started

Common bugs

#BugWhat you seeTypical severitySeverityHow much damage a bug does to the product or the user.Open in glossary →
1Undo doesn’t undoItem doesn’t come back, the wrong item comes back, or it reappears after refreshHigh
2Too fastDisappears before you can read it or reach UndoMedium
3Success after failure“Saved” even though the request failed (500 or offline in the network log)High
4Endless stackingMany toasts pile up and cover the screenMedium
5Covers important UIOn top of the bottom navigation, the FABFAB (floating action button)The round button that floats above the content, usually bottom right on Android, for the screen's main action.Open in glossary →, “Checkout” or the keyboardMedium
6Truncated textMessage or action cut off in other languages or with large textMedium
7Timer never pauses (web)The toast disappears while your mouse is on its buttonLow–Medium
8Screen reader silenceVoiceOver / TalkBack doesn’t announce itHigh (for affected users)
9Shows on the wrong screenYou navigate away and the toast follows, or appears after you returnLow
10Can’t be dismissedNo close button on a long or persistent toast; it blocks contentLow–Medium

Try it: toast timing lab

Set the duration to 2 seconds and try to press Undo. Turn off pause-on-hover and hover a toast. Pick Unlimited stacking and press Add 5 quickly. Turn off the live regionLive regionA part of the screen that a screen reader announces by itself when its content changes.Open in glossary → and see what a screen reader user would get.

🧪 Toast timing lab

Change the settings, then add items to the wishlist. Try to press Undo in time, hover a toast, and spam the button.

Duration: 6 s
Position
Stacking
Peak Outdoor Wishlist (0)

Trail running shoes

€119.00

Problems with these settings

Sensible settings. Now set the duration to 2 s and try to press Undo.

Screen reader would say

  • Add something to the wishlist…

Find the bug

This mail app archives emails with a snackbar and Undo. It has six bugs. Explore it like a tester:

🐞 Bug hunt: Mail inbox

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
9:41
Search in mail

Primary

  • TTAP Air PortugalYour Lisbon trip itinerary
  • PPeak OutdoorYour order has shipped
  • AAna SilvaTeam lunch on Friday?
  • CCityBankYour October statement
  • RRunClubWeekly running summary
  • FFoodly20% off sushi tonight

Device settings

Network log

  • Archive an email to see API requests…
  1. 1

    Hint: Archive one email, wait, archive another, then press Undo.

  2. 2

    Hint: Count how long the snackbar stays.

  3. 3

    Hint: Archive three emails quickly.

  4. 4

    Hint: Look at what is under the snackbar.

  5. 5

    Hint: Turn on Poor connection, archive an email, check the network log, then refresh.

  6. 6

    Hint: Turn on Large text and archive an email.

Check this part

  1. The app shows "Saved" but the network log shows a 500 error. What should happen instead?

  2. How do you catch a "success after failure" bug?

Undo that doesn't undo, toasts that vanish too fast, success shown after a failure, stacking, covered UI and screen reader silence.

Part Not started

How to test it

Start without any tools. Find a screen that uses this component and use it the way a real user would: slowly, then fast, then in ways nobody planned for. Tick off the checklist as you go. Most of it needs only your eyes and your fingers.

Then try the example test cases. Some of them need a little setup:

  • A slow or missing connection: switch on airplane mode, or slow the network down. See Network conditions.
  • A server error on purpose: ask a developer for a test setup that returns errors, or fake one with a proxy tool.
  • A screen reader: VoiceOver on iPhone, TalkBack on Android. Both are in the phone’s Accessibility settings. See Mobile accessibility.
  • Large text: set the text size to the maximum in the phone’s Display or Accessibility settings.
  • A keyboard: on the web, put the mouse away and use Tab, Enter, Space, Esc and the arrow keys.
  • Another language, region or time zone: change it in the phone’s settings, then reopen the app.

New to this? Do the checklist first and skip any test case whose setup you don’t know yet.

Checklist

Toast / snackbar test checklist

0 of 12 checked

Example test cases

TC-TST-001Archive shows a snackbar with Undo

Steps

  1. Open the inbox
  2. Tap the archive icon on "Team lunch on Friday?"

Expected result

The email disappears and a snackbar "Conversation archived" with "Undo" appears above the bottom navigation for at least 4 s.

TC-TST-002Undo restores the correct email

Steps

  1. Archive "Your order has shipped"
  2. Wait 5 s
  3. Archive "Team lunch on Friday?"
  4. Tap Undo

Expected result

"Team lunch on Friday?" is back in its original position. "Your order has shipped" stays archived. After refresh, the result is the same.

TC-TST-003Failed request shows an error, not success

Preconditions

  • Server returns 500 for archive, or device is offline

Steps

  1. Archive any email
  2. Wait for the request to finish

Expected result

An error such as "Couldn't archive. Retry" is shown and the email stays in (or returns to) the inbox.

TC-TST-004Snackbars replace each other

Steps

  1. Archive three emails within 2 seconds

Expected result

Only one snackbar is visible at any time. Undo on it restores the last archived email.

TC-TST-005Snackbar does not cover navigation or the FAB

Steps

  1. Archive an email
  2. While the snackbar is visible, tap each bottom navigation item

Expected result

The snackbar sits above the navigation bar, the Compose button moves up, and all navigation items work.

TC-TST-006Message is readable at the largest text size

Preconditions

  • System font size set to maximum
  • App language set to German

Steps

  1. Archive an email

Expected result

The full message is readable (wraps to two lines if needed) and the Undo action is fully visible.

TC-TST-007Web toast pauses on hover and focus

Steps

  1. Trigger a toast
  2. Move the mouse over it and wait 15 s
  3. Move the mouse away
  4. Trigger another and Tab to its Undo button, wait 15 s

Expected result

The toast stays while hovered or focused and starts its timer again afterwards.

TC-TST-008Screen reader announces the toast

Preconditions

  • TalkBack / VoiceOver / NVDA is on

Steps

  1. Archive an email (or trigger the toast on web)

Expected result

The screen reader reads "Conversation archived" (and the action) without moving focus away from where the user was.

Tip: click a test case to expand it.

Check this part

  1. You press Undo after archiving an email. How do you know the server agrees?

  2. You tap Undo twice quickly. What should happen?

A checklist and example test cases for timing, Undo, failures, stacking, placement, large text and screen readers.

Part Not started

Accessibility

Mobile vs web

  • Toast: system pill, text only, 2 s or 3.5 s, no actions. Since Android 11, apps in the background can’t show custom-view toasts, and Android 12+ limits toast text to two lines and shows the app icon.
  • Snackbar: Material component with one optional action. One at a time, above the bottom navigation, pushes the FAB up.
  • Test with TalkBack, maximum font size, gesture navigation vs 3-button navigation, and with the keyboard open.
  • Rotate while a snackbar is visible: it should not duplicate or reappear.

Check this part

  1. How should a web toast be announced to screen readers?

  2. Which iOS statement is true?

Toasts are announced without stealing focus, give enough time, keep Undo reachable and readable; then Android Toast and Snackbar, iOS banners and web toasts.

Key takeaways

  • A toast is a short, non-blocking message that disappears on its own. Use it for confirmations and easy Undo, never for errors the user must act on or critical information.
  • Android has a Toast (text only) and the Material Snackbar (one action). iOS has no native toast. On the web, toasts usually stack in a corner.
  • Timing matters: 4 s or more, longer with an action, and on the web pause on hover and focus.
  • Test Undo hard: the right item, several in a row, and after a refresh.
  • Classic bugs: success shown after a failure, endless stacking, covering navigation, truncated text and screen reader silence.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.