Snackbars and toasts

Cross-platform differences

Terminology

To adhere to platform standards, Spectrum uses different terms for its user feedback mechanism across Android and iOS. Android uses the term “snackbar,” while iOS uses the term “toast.” Although the names are different, they describe the same concept.

Position

By default, the Android snackbar sits centered at the bottom of the screen, and the iOS toast sits at the top. However, in contexts where the default position conflicts with core editing panels, you can reposition both snackbars and toasts on the opposite side of the screen.

Dismissal

The Android snackbar offers an optional close icon button as its primary manual dismissal affordance, following Material Design patterns. The iOS toast instead relies on swipe, the familiar dismissal pattern on the platform, and also supports auto dismissal. When either platform uses auto dismissal, you can set it to dismiss after a short (4 seconds on Android, 3 seconds on iOS), medium (6 seconds), or long (10 seconds) timeframe. When TalkBack and VoiceOver are on, the timings double.

If the user taps an iOS toast set to auto-dismiss, the tap cancels the auto-dismissal, and the toast persists until the user dismisses it manually. This functionality is unavailable on Android.

Iconography

The Android snackbar uses predefined semantic icons only (informative, positive, notice, negative), avoiding decorative icons in a transient message. These semantic icons do not include semantic color, conveying meaning through shape alone. This matches Material Design’s neutral snackbar appearance. The iOS toast allows for the same predefined semantic icons as Android. In the rare case where these semantic icons are not sufficient, designers can use additional Spectrum icons. The semantic icons have a semantic color applied to them.

Anatomy

Android snackbar anatomy labeled Container, Text label, Action button, and Close button. iOS toast anatomy labeled Container, Text label, Text description, and Action button.

Android component options

Property
Value
Style
Neutral Informative Positive Notice Negative
Show button
Boolean
Show close icon
Boolean
Text
String

Style

The snackbar has five available style variants for various messaging types.

Neutral

The neutral variant is the default snackbar. Use this when the message is neutral in tone or when its semantics do not fit in any of the other variants. Most snackbars should use the neutral variant. Only use the other variants when the situation exactly matches their description.

Informative

The informative variant uses an info icon to convey the message tone. Use this when the message needs to draw more attention than the neutral variant.

Positive

The positive variant uses a checkmark icon to convey the message tone. Use this to inform users that a complex task was completed successfully.

Notice

The notice variant uses a diamond "alert" icon to convey the message tone. Use this to warn about a situation that may need to be addressed soon.

Negative

The negative variant uses a “triangle” alert icon to convey the message tone. Use this to show an error or failure.

Five snackbar style variants, each with "Snackbar text," a Label action, and a close icon. Neutral has no leading icon. Informative has an info icon. Notice has a diamond alert icon. Positive has a checkmark icon. Negative has a triangle alert icon.

Show button

A snackbar can optionally have up to one action. Keep the label concise, and use it only when there’s a direct, related action available. The action should also be available elsewhere within the app’s interface since the snackbar auto-dismisses. Don't use the action to dismiss the snackbar.

Two informative snackbars side by side, one with an info icon, "Snackbar text," and a Label action button, the other with only the info icon and "Snackbar text," no action button.

Show close icon

This boolean choice allows you to add a close icon to the trailing side of the snackbar.

Two informative snackbars side by side, one with an info icon, "Snackbar text," and a close icon, the other with only the info icon and "Snackbar text," no close icon.

Text

Type the text label to show in your snackbar.

iOS component options

Property
Value
Variant
None Informative Positive Negative Notice
Title
String
Description
String
Preferred width
Hug contents Fill container
Position
Top Bottom
Offset
Number
Action button
Boolean
Auto dismiss
None Short Medium Long

Title

Type the text label to show in your toast.

Description

Avoid descriptions as much as possible. Try to use shorter messages that don’t necessitate a description or use another component entirely if it cannot be avoided. Reserve toasts for short, concise messages.

Two toast notifications side by side. The left toast is a single line with a blue info icon, "Photo added to lightbox" text, and a "View photo" button. The right toast is taller, with the same info icon and bold "Photo added to lightbox" title, followed by a gray description reading "You can review it anytime before licensing or downloading," with a "View photo" button below.

Preferred width

You can set toasts to hug or fill. On larger devices, toasts set to fill will never exceed the width of iOS’s readable content guide.

Two mobile screens labeled "Hug contents" and "Fill container," comparing toast width. In the first, a toast reading "Your item has been saved." sits narrower than the screen width, leaving the app icon and part of an obscured icon visible on either side of it in the navigation bar. In the second, the same toast spans the full width of the screen, covering the navigation bar entirely except for a sliver of the app icon peeking out from the left edge.

Position

By default, the toast is centered at the top of the screen, below the top safe area. However, it can be configured to appear centered at the bottom of the screen if the default position interferes with core editing panels.

Offset

The offset property allows engineers to adjust the toast’s distance from the top or bottom safe areas. Safe areas are the regions at the top and bottom of the screen that contain system UI. At the top, this includes the battery, clock, and Wi-Fi indicators. At the bottom, it includes the home indicator.

Two mobile screens labeled "0pt offset" and "100pt offset," comparing toast placement. In the first, a toast reading "Your item has been saved." with an "Undo" button sits directly below the status bar, covering the navigation bar underneath it. In the second, the same toast appears lower on the screen, revealing the navigation bar above it, which includes a notification bell icon and profile photo that were hidden in the first screen.

Action button

A toast can optionally have up to one action button. Keep the button’s label concise, and use it only when there's a direct action related to the toast text. The action should also be available elsewhere within the app’s interface since the toast auto-dismisses. Don't use the action to dismiss the toast.

Two white pill-shaped toast notifications side by side, each with a blue info icon and "Toast text." The left toast includes a gray "Label" button on its trailing side; the right toast has no button.

Presets

Four iOS toast presets, each reading "Title summarizing the action that triggered this toast" with a Label action. Informative has a blue info icon. Notice has an orange diamond alert icon. Positive has a green checkmark icon. Negative has a red triangle alert icon.
iOS has four presets: informative, positive, notice, and negative.

Informative

The informative variant uses an info icon to convey the message tone. Use this when the message needs to draw more attention than the neutral variant.

Notice

The notice variant uses a diamond "alert" icon to convey the message tone. Use this to warn about a situation that may need to be addressed soon.

Positive

The positive variant uses a checkmark icon to convey the message tone. Use this to inform users that a complex task was completed successfully.

Negative

The negative variant uses a “triangle” alert icon to convey the message tone. Use this to show an error or failure.

Behaviors

Triggering

Because snackbars and toasts are transient messages, not all actions are appropriate triggers for them. Simple notifications and low-priority alerts are good candidates. Errors are not. When it comes to confirmations, first ask yourself if there is another way the user would know the action was successful. Is there a new item present? If so, perhaps that's enough to tell the user the app successfully created the item. If there is no other way, then a snackbar or toast might be appropriate for a confirmation.

Remember that the goal is not to have as many snackbars and toasts as possible, but rather to only have the ones the experience absolutely requires.

Duration and dismissal

When choosing an auto-dismissal delay, match the duration to the amount of text in the snackbar or toast, keeping in mind that users will spend part of that time noticing it, not just reading it.

Stacking and queuing

Snackbars and toasts appear one at a time. Subsequent snackbars or toasts appear after the user or the system dismisses the preceding snackbar or toast (manually or automatically). On Android, a snackbar with updated information can immediately replace an outdated snackbar rather than waiting in the queue. For example, a user might save an item to favorites and then quickly remove it before the first snackbar dismisses. This option is not available on iOS.

Positioning and movement

Android snackbar reading "Your item has been saved" with an Undo button and a close button, positioned at the bottom of a photo template gallery screen above the Home, Projects, and Learn tabs. Beside it, an iOS toast with the same message positioned at the top of a home screen reading "Welcome back!”

Android

Snackbars use a scale animation to enter from the bottom of the screen to rest just above the navigation bar. On scroll, the snackbars stay where they are; they do not scroll with the rest of the page content.

When a FAB is present, the snackbar should push the FAB up upon entry. You can set snackbars to animate in from the top and position them just below the app bar if necessary.

In compact breakpoints (under 600 dp), snackbars span the full width of a device, bounded by left and right margins. Text and actions align along the horizontal axis until wrapping becomes necessary.

At medium breakpoints (600 dp+), snackbars hug their content until they reach their maximum width, which is determined by line length.

iOS

By default, toasts animate in from the top of the screen and rest just below the safe area, and on top of the toolbar. On scroll, they stay where they are; they do not scroll with the rest of the page content. You can set toasts to animate in from the bottom and position them just above the tab bar if necessary.

iOS toasts can be set to hug or fill. On larger devices where they are set to fill, they will never exceed the width of iOS’s readable content guide.

Haptics and motion

Haptics

Snackbars and toasts support optional haptics on dismissal only. Entry does not trigger haptic feedback.

Motion

On both platforms, the snackbar or toast exits in the direction from which it entered. This keeps the motion predictable and doesn't distract from the content of the message itself.

Android

The snackbar scales up and away from the entry point, and does the inverse on exit.

iOS

The toast slides down from the top of the screen on entry, and exits back up the way it came.

Usage guidelines

When to use

  • Confirming a completed complex task when the result is not immediately obvious.
  • Providing lightweight system status updates, for example, sync complete, connection restored.
  • Surfacing non-critical background results the user doesn't need to act on immediately.

When not to use

  • Anything requiring a decision or input before proceeding.
  • Persistent or critical system states the user must not miss.
  • Content the user needs to reference later or re-read. Toasts and snackbars are ephemeral by nature.
  • As the sole confirmation for destructive, irreversible actions. Use a confirmation step beforehand instead.
Form validation or field-level errors. Use inline error states instead.
Toast with a diamond alert icon reading "Phone number invalid."

Severity & type variants and their appropriate use

  • The neutral style variant is the default snackbar. Use this when the message is neutral in tone or when its semantics do not fit in any of the other variants.
  • The informative variant uses an information icon to convey the message tone. Use this when the message needs to draw more attention than the neutral variant.
  • The positive variant uses a checkmark icon to convey the message tone. Use this to inform users that a complex task was completed successfully.
  • The notice variant uses a diamond “alert” icon to convey the message tone. Use this to warn about a situation that may need to be addressed soon.
  • The negative variant uses a “triangle” alert icon to convey the message tone. Use this to show an error or failure.

Frequency & restraint

If you're not sure, leave it out.

  • More snackbars and toasts isn't the goal, the right amount is. A lot of the time the interface changing on its own (abutton flipping states, an item showing up in a list) is enough feedback without adding a snackbar or toast on top.

Anything critical shouldn't live exclusively in a snackbar or toast.

  • Because they're transient and easy to miss, you should also make critical content and actions available somewhere persistent and discoverable (a notification center, inline status, etc.).

Skip the snackbar or toast if success occurs in the background

Actions that are supposed to work quietly in the background, such as autosaves and background syncs, don’t need confirmation through a snackbar or toast.

Snackbar with a checkmark icon reading "Your file has been autosaved," with a close button.

Don't create multiple snackbars or toasts for one bulk action

If someone deletes 12 items at once, they don't need 12 snackbars or toasts. One summary does the job: “12 items deleted.”

Toast with an info icon reading "12 items deleted.”

Internationalization

Left-to-right and right-to-left comparison of an iOS toast and Android snackbar reading "This file is view-only until the owner grants edit access," with a Request access action. In the right-to-left versions, the icon moves to the right side and the action and close button move to the left.
In right-to-left (RTL) layouts, the semantic icon sits on the right side, and the close and action buttons sit on the left.

Accessibility

The component builds in accessibility behaviors to meet user preferences, including font scaling settings, bold text, reduced animations, TalkBack and VoiceOver compatibility, support for non-touch navigation models, and tap targets for nested actions.

Reduced motion

Both the Android and iOS components respect the OS-level reduced motion setting. You don’t need to do additional work to respect this setting.

Minimum display duration

Auto-dismiss timing should account for reading time, not just a flat default. Give users enough time to notice the snackbar or toast, read it, and react to it, especially if it has an action button attached.

Icon labels

Android

Icons in the snackbar are monochromatic and part of the system default. You can't customize them, and the code already includes their accessible name. You don’t need to do additional labeling work.

iOS

The default toast types (Informative, Positive, Negative, Notice) already have accessible names built in. But since iOS toasts support custom icons and images, you must manually supply an accessible name for any custom icon you add outside those default types.

Perceivable

Requirement
Criterion
Level
Compliance
Use of color
1.4.1
A
On Android, the component doesn't use color to convey information to the user. On iOS, preset toasts use color for leading icons, but the icon's shape accompanies the color and also conveys meaning.
Contrast (minimum)
1.4.3
AA
Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement.
Non-text contrast
1.4.11
AA
The visual presentation of icons and various states has a contrast ratio of at least 3:1.

Operable

Requirement
Criterion
Level
Compliance
Timing adjustable
2.2.1
A
On iOS, tapping a snackbar or toast cancels auto dismissal, allowing it to stay on screen until manual dismissal. For both Android and iOS, default dismissal times double when TalkBack or VoiceOver are active.
Pause, stop, hide
2.2.2
A
Tapping a snackbar or toast cancels auto dismissal, allowing it to stay on screen until manual dismissal.
Focus order
2.4.3
A
On both platforms, the toast's action inserts into the assistive technology's navigation sequence in a position that preserves its relationship to the triggering context. On Android, TalkBack users can access the snackbar via linear swipe order, and on iOS via an explicit rotor-based path to the toast stack. In both cases, focusable components receive focus in an order consistent with their meaning and operability.
Target size (enhanced)
2.5.5
AAA
All dismissal and action buttons within a snackbar or toast are larger than 44 × 44 CSS pixels.
Target size (minimum)
2.5.8
AA
All dismissal and action buttons within a snackbar or toast are larger than 24 × 24 CSS pixels.

Resources