Toast notifications are one of the most-used UI patterns in modern web applications and one of the most consistently mis-implemented. The defaults that ship in most component libraries are too long, too prominent, and too interruptive. They work fine for low-frequency notifications but become punitive in products where the user is making many state-changing actions per session.
A well-designed toast system is invisible when things are working and informative when they are not. Building it requires a handful of decisions about timing, positioning, queueing, and dismissal that most teams skip past on the way to shipping the feature.

Photo by Ravi Roshan on Pexels
Step 1: Decide What Toasts Are For
The first decision is also the most important. Toasts are useful for confirming successful actions and surfacing recoverable errors. They are not useful for critical errors that require user action (use a modal), persistent state (use a banner), or detailed information (use a dedicated screen).
If a product has 12 different things shipped as toasts, the toast system has become a dumping ground for messages that need different treatments. The first audit step is to inventory every toast in the product and classify each one as "actually a toast", "should be a modal", "should be a banner", or "should be removed entirely".
The Nielsen Norman Group guidance on transient feedback patterns covers the boundaries between each pattern. The boundaries matter because misclassified messages produce a worse user experience than the correct pattern.
Step 2: Set the Timing
The default toast timeout in most component libraries is 4 to 5 seconds. This is too long for low-friction confirmations and too short for messages with content the user needs to read.
A reasonable rule: confirmation toasts (e.g., "saved", "sent") should dismiss in 2 to 3 seconds. Informational toasts (e.g., "project created with 5 default tasks") should dismiss in 4 to 6 seconds. Error toasts should not dismiss automatically -- the user should explicitly close them so they have time to read and respond.
The timing should be configurable per toast, not a single global default. A success toast with no useful content beyond "it worked" can dismiss faster than a toast that includes an undo action or a link to the affected object.
Step 3: Choose the Position
Toast position matters more than most teams realize. The four common positions -- top-right, top-center, bottom-right, bottom-center -- have different ergonomic properties.
Top-right is the most common default. It is fine for low-frequency notifications but tends to overlap with help widgets, user menus, and notification bells. Users learn to ignore the top-right corner, which is bad for notifications that need to be seen.
Bottom-center is better for products where the user's attention is on the main content area. The notification appears where the user is looking, dismisses quickly, and does not interfere with persistent UI elements.
Bottom-right works for products where the user is focused on form input or content creation. The notification appears in peripheral vision without interrupting the active task.
The choice depends on what the user is doing when the toast fires. For onboarding flows specifically, bottom-center tends to outperform other positions because the user's attention is on the main content area, not on header navigation.
The MDN documentation on ARIA live regions covers the accessibility implementation that makes toast notifications usable for screen-reader users regardless of position.
Step 4: Handle the Queue
What happens when multiple toasts fire in quick succession? The naive implementation stacks them, which produces a wall of toasts that the user cannot read. The slightly less naive implementation dismisses the previous toast when a new one arrives, which means the user misses messages.
The right implementation depends on the product. For most products, a small queue (max 3 to 5 visible at once) with a short stagger between appearances works well. Toasts older than the visible limit are dropped if more arrive while the queue is full; the user does not see them but the system does not block.
The queue also needs deduplication. If the same action fires the same toast three times in a row -- because of network retries, optimistic updates that get rolled back, or a UI bug -- showing three identical toasts is worse than showing one. Deduplicate by toast content and merge the repeated firings into a single visible toast.
Step 5: Make Dismissal Work
Toast dismissal should support multiple paths. Auto-dismissal after the timeout. Explicit dismissal via a close button. Dismissal-by-action (e.g., clicking the toast itself navigates to the related object and dismisses the toast). Keyboard dismissal via Escape.
The keyboard path is the most commonly forgotten one. Users who navigate by keyboard should be able to dismiss the most recent toast without picking up the mouse. A global Escape handler that dismisses the most recent toast is a small piece of code that significantly improves keyboard usability.
The W3C accessibility guidelines on dismissible content cover the implementation patterns. The relevant accessibility requirement is that any auto-dismissing UI element should be dismissible by an explicit user action and should not require time-based interaction to be readable.
Step 6: Wire Up the Action Pattern
Toasts that confirm a state change should optionally include an action button. The most common action is "Undo", which gives the user a chance to reverse the change without navigating away.
The undo pattern works because state changes feel safer when they are reversible. A user who knows they can undo an action with one click is more likely to take the action in the first place. For onboarding flows specifically, the undo pattern reduces the "did I just break something?" anxiety that drives users away from products in the first session.
Implementing undo requires the state change to be reversible on the backend. For most CRUD operations this is trivial. For more complex operations (cascading deletes, multi-step workflows) it requires deliberate design.
If undo is not feasible, an alternative action pattern is "View" -- a button that navigates to the affected object so the user can see the result of their action. This is less powerful than undo but still gives the user a path from the toast to the action's effect.

Photo by Wolf Art on Pexels
Step 7: Add the Animation
Toast animations are one of the few areas where the default behavior of component libraries is usually fine. A slide-in from the edge of the screen, a brief pause, and a fade-out on dismissal works for almost all cases.
The two things to avoid are: animations that exceed 300 milliseconds (the user starts to notice them and they feel sluggish), and animations that block user input (the user cannot interact with the rest of the screen while the animation is playing).
For onboarding flows specifically, the animation should reinforce the success of the action. A check-mark icon that briefly animates in, followed by the message text, is more reassuring than a plain text-only toast.
Step 8: Test Across Failure Modes
The final implementation step is to test the toast system across the failure modes that production traffic will eventually hit.
What happens when the user navigates away mid-animation? The animation should clean up properly.
What happens when the user fires 20 toasts in 5 seconds? The queue should not block the UI or accumulate memory leaks.
What happens when JavaScript fails to load? The page should fall back gracefully without the toast system being a dependency for critical paths.
What happens for screen-reader users? The live-region implementation should announce the toast content without overwhelming the user.
The Smashing Magazine reference articles on component testing cover the test patterns for transient UI elements. The patterns are worth implementing because the failure modes are real and they tend to surface in production rather than in development.
The Broader Point
The toast system is one component, but the design decisions that go into it -- timing, positioning, queueing, dismissal, action patterns, animation -- apply to most transient UI elements. Building one well usually means the team has the patterns to build others quickly.
At 137Foundry, toast systems are one of the small components that show up in almost every onboarding redesign because the existing implementation is usually mistuned for the product's actual notification volume. Fixing the toast system is a small change with surprisingly large downstream impact on perceived product responsiveness.
For the broader onboarding redesign framework that the toast work sits inside, the 137Foundry guide on onboarding drop-off walks through the systematic redesign process.
The toast system is one of those small details that makes the difference between a product that feels polished and a product that feels rough. Worth getting right.
Top comments (0)