Components · Notifications

E-Com Toast

An E-Com Toast confirms a shopping action without leaving the page: a product added to the cart, or saved to the wishlist. It has no status color; it speaks in the store’s own black and white.

Every example is the real component, and every “Show toast” button fires a real toast in the corner of your window. System messages and errors use the Toast. Figma: E-Com Toast.

Playground

Choose a variant and edit the text. Press Show toast to see it arrive in the corner of your window. With Auto-hide on it leaves after the chosen time (4 seconds by default); off, it stays until you close it.

Breakpoint
Variant
Auto-hide

The slide-in and slide-out animation is set in Motion.

Markup for this selection

HTML

The markup has no motion. Slide-in and slide-out animation is set in Motion.


In action

Add to cart shows the cart toast with its two next steps. Add to wishlist shows the informational toast; press it again to remove. The toast closes after 4 seconds, with ×, or on a click outside it.

Nothing happened yet.


Overview

An E-Com Toast confirms a shopping action without leaving the page: a product added to the cart, or saved to the wishlist. It has no status color; it speaks in the store’s own black and white.

It is a task-generated notification, like the Toast, and it enters the same way. System messages and errors use the Toast, never the E-Com Toast. Not sure which one to choose? Start at the Notifications guide.

This documentation has three pages. Examples & Guidelines (this page) shows when and how to use an E-Com Toast. Specifications holds the values: tokens, sizes, measurements, states and requirements. Code shows how to show an E-Com Toast from script and the CSS behind it.


Usage

When to use

Use an E-Com Toast for a product interaction. Use it to:

  • Confirm that a product was added to the cart, and offer the two natural next steps
  • Confirm light shopping feedback, such as a product added to or removed from the wishlist

When not to use

Errors and system status

The E-Com Toast has no status color and no status icon, so it cannot carry a failure. Use the Toast for errors and system messages.

Do confirm a product in the cart with an E-Com Toast.
Do not report an error in an E-Com Toast. Use a Toast instead.

Name the product

The product name is in bold and the text says what happened to it. A message with no product name leaves the user guessing.

Do name the product in bold and say what happened.
Do not leave out the product. “Added” alone says too little.

Quick reference

The message…Use
confirms a product was added to the cart or wishlistE-Com Toast (this page)
confirms any other action, or reports an errorToast
needs the user to confirm before it happensModal

Do

  • Name the product in bold and say what happened.
  • Offer the two natural next steps on Add to cart.
  • Use the Informational variant for wishlist and similar light feedback.
  • Keep the toast to the top-right corner, like every toast.

Don’t

  • Show errors or system status. Use the Toast.
  • Ask the user to confirm something. Use a Modal.
  • Add a status color or icon. This toast has none.
  • Leave it open indefinitely.

Anatomy

Add to cart

  1. Product image. 40×40px, object-fit: contain.
  2. Product name and text. The name in bold, then the text in regular.
  3. Close. A Blank icon button, 20px icon, 2px padding.
  4. Secondary button. Blank, no frame: “Choose accessories”.
  5. Primary button. “Go to cart”. Fills the rest of the row.

Informational

  1. Name and text. White text on the black surface.
  2. Link. Optional. An inline link in the inverted color, underlined.
  3. Close. A Blank inverted icon button.

Variants

Two variants. There is no status or emphasis property: pick the variant by how much the user can do next.

Breakpoint

Add to cart

White surface with the product image and two ways forward: choose accessories or go to the cart.

Informational

Black surface with light text and an optional underlined link. For short information that needs little or no interaction, such as “added to wishlist”.


Sizes

Add to cart is 440px wide from 640px and 375px below; Informational is 375px at every breakpoint. Padding and text are listed under Sizes in Specifications. Tablet (640–768px) already has the wide card and 24px padding; only the buttons are mobile-sized.

Breakpoint

Layout & Appearance

Alignment

The image, the text and the × sit on one row, top-aligned. The buttons are on a row below, with the Primary button filling the rest. In Informational the link wraps after the text with an 8px and a 12px gap.

Placement

The same as the Toast: fixed in the top-right corner of the window, and from the top at the full width on mobile. One toast at a time.

Width

440px (Add to cart) or 375px (Informational) from 640px, never wider than the window. Below 640px both fill the width.

Appearance

Add to cart is white; Informational is black with an inverted text and a 1px edge. Both use the highest shadow. Token names and values are under Design Tokens in Specifications.


Behavior

Dismissal

The toast closes with the ×, with a click outside it, or by itself after 4 seconds. A click on a button or the link runs its action and closes the toast.

Hover and focus

Buttons, the link and the × take focus with a visible ring, on keyboard use only. In Informational the link loses its underline on hover. All states are under States in Specifications.

Motion

Same as the Toast: it only slides, 300ms. Try other values under Motion above, and see Motion in Specifications.


Accessibility

All requirements are listed under Accessibility Requirements in Specifications.

Keyboard support

Tab moves to the buttons, the link and the ×, each with a visible focus ring. The toast does not take focus when it appears.

Screen reader support

The toast area is role="status" with aria-live="polite", so the message is announced without moving focus. The product image is decorative (alt=""): the name is in the text.



References