iOS
Android
Snackbar
Last updated Aug 20, 2019

A Snackbar is a temporary message that does not require user confirmation. It is useful to communicate feedback for user actions, and in keeping the user informed of system status.

Usage

When to use snackbar

When Not to use snackbar

Visual design

Single line snackbar

Every Snackbar has a message and an optional action. We automatically determine if the message spans one or two lines, based on its length. Since we want messages to be concise, the single line spec should be most common.

Button on its own line

There are certain cases where we push the button to a new line:

  • If the message and button run close to each other and we cannot maintain 16px padding between them.
  • If the message text runs over to two lines, we push the button down to its own line.

Layout

The height of the Snackbar is independent of its container—it only depends on the Snackbar contents. The width is always relative to the screen size.

Interactions

Timing
A Snackbar is temporarily displayed on the screen, for 4 seconds.
hover to play
Tap to dismiss
Tapping anywhere on the Snackbar (outside the action) will immediately dismiss it.
hover to play
Tap on action
Tapping on the action will immediately perform it, and dismiss the Snackbar.
hover to play

Accessibility

Voiceover

  • Announce the Snackbar content automatically once it appears (without user intervention), e.g. "1 item deleted". If there is an action, announce it, e.g "1 item deleted. Action available."
  • The focus doesn't shift to the Snackbar when it pops up, since it will interfere with the user's current work.
  • If there is no action, dismiss after regular timing rules. If there is an action, keep the snackbar active for an extended period of 10 seconds. Future: keep snackbar up permanently, and provide instructions for the user to dismiss it.
  • The Snackbar is dimissed when a user double taps the action, or navigates away from the view, or the time expires.
  • The Snackbar message and action should each be tappable.
  • For the Snackbar action, "<label>. <element-type>"</element-type></label> is read out, eg: "Undo. Button"

Large text

RTL layout

Future Updates

  • On iPad make the width dynamic based on length of content inside Snackbar instead of based on % of container.
  • Voiceover: Keep the Snackbar up permanently and communicate how the user can find it on the screen and how the user can dismiss it.