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.

30 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 Design.

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.

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. In Compose, SnackbarDuration.Short is 4 s and Long 10 s; the older View-based Snackbar uses much shorter presets (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 reader or a slow hand.
  5. Nothing happens twice. Tapping Undo twice doesn’t restore two copies.

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.

Common bugs

#BugWhat you seeTypical severity
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 FAB, “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 region 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:

  • Archive one email, then two in a row, and use Undo.
  • Watch how long the snackbar stays and where it appears.
  • Turn on Poor connection, archive, then refresh (the button next to the search bar).
  • Turn on Large text.

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

How to test it

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.

Accessibility

  • Announce it. Screen readers don’t notice text that just appears (WCAGWCAGThe Web Content Accessibility Guidelines, the main international standard for accessibility.Open in glossary → 4.1.3 Status Messages, Level AA). Native Android Snackbars and Toasts are announced by TalkBack; custom iOS banners need an announcement.
    Dev note
    On the web, put toasts inside a container with role="status" (or aria-live="polite") that already exists in the page before the message is added. Use role="alert" only for urgent errors. On iOS: UIAccessibility.post(notification: .announcement, ...).
  • Don’t steal focus. A toast should be announced, not focused: moving focus would interrupt what the user was doing.
  • Give enough time. WCAG 2.2.1 (Timing Adjustable) asks that users can turn off, adjust or extend time limits. For toasts that means a long enough duration, pausing on hover and focus, and never putting the only copy of important information in one. Android also has a system setting (“Time to take action”) that apps should respect.
  • Make the action reachable. Keyboard users must be able to reach Undo before it disappears. Some apps offer an alternative, like a keyboard shortcut or an Undo item in a menu.
  • Contrast. Message text needs 4.5:1 against the toast background, and the action button color too. Check in light and dark modeDark modeA display setting that uses light text on dark backgrounds.Open in glossary →.
  • Don’t rely on color alone for success vs error: add an icon and clear words.
  • Large text. At the biggest Dynamic TypeDynamic TypeThe phone setting that lets users make text bigger or smaller across apps.Open in glossary → or font scale, text must wrap, not clip, and the action must stay visible.

Mobile vs web

  • No native toast. Apps build their own: top banners that look like notifications, centered HUDs, or Material-style bars from a library. Quality varies a lot.
  • Check placement against the notch / Dynamic Island, the home indicator and the tab bar.
  • Custom components often forget VoiceOver announcements and Dynamic Type.
  • Swipe-to-dismiss (usually up for top banners) should work and must not trigger the system notification center.
  • 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 your understanding

Quick quiz

0/5 answered · 0 correct

  1. 1.Which message fits a toast best?

  2. 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. 3.The app shows "Saved" but the network log shows a 500 error. What should happen instead?

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

  5. 5.Which iOS statement is true?

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 (role="status").

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 review cards are now in Bites ⚡
Esc

Type to search the whole site.