Skip to main content
FeedbackLevel 1

Toast

轻提示

WebMobileDesktopDifficulty: Easy

A small confirmation that drifts into the corner of the screen after an action and disappears on its own a few seconds later.

01

Live Demo

Actually clickable
Hit a button and the notice floats in at the top, disappearing after 3 seconds. It has no buttons — if you need one, you want a Snackbar.

What you just saw:The "Sent" that drifts down at the top of the screen after sending a message, the "Saved to Photos" that flashes in the bottom-right corner after saving an image — both are toasts.

02

What it actually is

A toast says exactly one thing: the action you just took succeeded. It has no buttons — if you need an action, use a Snackbar — it never blocks the user, and it disappears by itself. Its job is a momentary confirmation, not a message that demands attention.

toasttoast notificationflash messagetransient notificationstatus toast
03

Anatomy · What it's made of

  1. Container容器

    Dark background, white text, border-radius 8px

  2. Icon图标

    Success ✓ / failure ! / info i

  3. Message文案

    One sentence, ≤20 characters

  4. Duration时长

    Auto-dismisses after 2–4 seconds

04

When to Use

When it fits, and when it doesn't
Toast usage recommendations
SituationUse it?
An action succeeded and needs a one-line confirmationYes
You do not want to interrupt what the user is doingYes
The information is simple and requires nothing from the userYes
The user has to make a choice (undo / retry)No
You need to convey a serious errorNo

The moment you put an "Undo" button inside it, it has become a snackbar — do not mix the two.

Repeated actions make toasts stack into a column, which reads like something has gone wrong.

05

Similar Patterns

Don't mix these up
Full comparisonToast vs Snackbar vs AlertThe action is done and I want to acknowledge it. Which one?See the table
06

How to tell AI

Three levels of prompt

Add the component name and specifics

After a successful save, show the toast "Photo saved" — dark background, white text, a checkmark icon, centered at the top of the screen, fading out automatically after 2.5 seconds.

07

Don't just say this to AI

Bad → Better

Don't say this to AI

Show a confirmation after the action.

Say this instead

After a successful action, show a toast: dark background, white text, a circular icon, centered at the top, auto-dismissing after 3 seconds, with role="status" + aria-live="polite", and replace instead of stacking when triggered again.

08

Share this card

Social-ready

Turn this pattern into a 3:4 or 1:1 knowledge card and export it as PNG right in the browser. No backend needed.