---
url: /components/snackbar/guidelines.md
description: >-
  Snackbars provide brief messages about app processes at the bottom of the
  screen.
---

# Snackbar

Snackbars provide brief messages about app processes at the bottom of the screen.

[Overview](overview.md) · [Specs](specs.md) · **Guidelines** · [Accessibility](accessibility.md)

![Snackbar at the bottom of a mobile device.](/assets/c94cfbd7-m6a9x4e1-1.DLyyHbi-.webp)

## Usage

Snackbars inform users of a process that an app has performed or will perform. They appear temporarily, towards the bottom of the screen.

They shouldn't interrupt the user experience. People can browse the page content without being required to interact with the snackbar.

**Frequency**<br>Only one snackbar may be displayed at a time.

**Actions**<br>A snackbar can contain a single action. "Dismiss" or "cancel" actions are optional.

![Snackbar showing 'Email archived' text with an 'Undo' text button.](/assets/d16f62f2-m6a9y0k8-2.C3NehM7G.webp)

### Similar components

[Dialogs](../dialogs/overview.md "Dialogs provide important prompts in a user flow.") are also designed to show important messages.

Choose the right component based on the importance of the message. This component messaging strategy can help avoid overusing snackbars.

![Dialog on a phone requiring the user to sign in to continue. Dismissing prevents them from progressing.](/assets/54f98629-m8ov80w7-4.B7H90_Xz.webp)

Dialogs require immediate action

**When to use snackbars**<br>Snackbars communicate messages that are minimally interruptive and don’t require user action.

| Component |    Priority   |                                                User action                                                |
| :-------: | :-----------: | :-------------------------------------------------------------------------------------------------------: |
|  Snackbar |  Low priority |                                Optional: Snackbars disappear automatically                                |
|   Dialog  | High priority | Required: Dialogs block app usage until the user takes a dialog action or exits the dialog (if available) |

### Accessibility requirements for web

On web, auto-dismissing snackbars are inaccessible for people with low vision or who require additional time to perceive information. This can be solved in 2 ways:

#### 1. Add inline feedback

Information in auto-dismissing snackbars must also be communicated using another accessible method inline or near the action that triggered the snackbar. 

For example, update the label on a "Save" [button](../buttons/overview.md "Buttons let people take action and make choices with one tap.") to “Saved”, and trigger an auto-dismissing snackbar that communicates the same message. 

#### 2. Make the snackbar actionable

Alternatively, add actions to the snackbar so it doesn't dismiss until acted on.

![A button labelled "Save" changes to "Saved" after a moment. A snackbar confirms all changes are saved.](/assets/7ac9e1c8-lwoxyec0-5.CXH02Nxj.webp)

Also communicate snackbar information near the action that triggered the snackbar

## Anatomy

![4 elements of a snackbar.](/assets/f704be1d-lwoy0ibw-6.C_0oBL3s.webp)

1. Container
2. Supporting text
3. Action (optional)
4. Close button (optional)

### Text label

Snackbars contain a text label that directly relates to the process being performed. In [compact breakpoints](../../foundations/layout/breakpoints/compact.md "Window widths smaller than 600dp, such as a phone in portrait orientation."), the text label can contain up to two lines of text.

![Snackbar on a mobile device reading: "Saved in Vacation album".](/assets/94e0e822-lwoy1q93-7.BE1qVeNL.webp)

Text labels are short, clear updates on processes that have been performed

::: tip Do
![Snackbar on mobile with one line of content.](/assets/d5aac2c5-lwoy2p4f-8.BJM3TDD7.webp)

Keep the snackbar text label to one line long when possible
:::

::: tip Do
![Snackbar on mobile with two lines of content.](/assets/6a0bb793-lwoy3zcx-9.BzcpGY1C.webp)

On mobile, the text label can be up to two lines long
:::

::: warning Caution
![Snackbar on mobile with an icon and one line of content.](/assets/6f162024-lwoy4zjx-10.BikAU3dd.webp)

Avoid adding icons to snackbars. If your message needs an icon, consider using a different component such as a dialog.
:::

::: danger Don't
![Snackbar on mobile with bolded and hyperlinked words.](/assets/e88fb689-lwoy6dj7-11.CdYzxGQD.webp)

Avoid using stylized text or inline links in snackbars; they can add unwanted complexity. If your message needs a link, add a button instead, or use a different component.
:::

### Container

Snackbars are displayed in rectangular containers with a grey background. Containers should be completely opaque, so that text labels remain legible.

![Snackbar showing a light text label on a black color container.](/assets/12c00258-lwoy7luk-12.GgGpL2P3.webp)

Snackbar containers use a solid background color with a shadow to stand out against content

::: danger Don't
![A snackbar with button text the same color as supporting text.](/assets/2824ef38-mkvoz7q4-13.C0bnunuU.webp)

The text label shouldn’t share the same color as the text button
:::

::: danger Don't
![A snackbar with the action in elevated style.](/assets/ed6566d3-mkvoydmj-14.AKwkGsQC.webp)

Don’t use a filled or elevated button in a snackbar, as it draws too much attention
:::

::: tip Do
![An extended snackbar on tablet with a long text label.](/assets/be196438-lwoyabsh-13.BYuqi14_.webp)

In wide layouts, extend the container width to accommodate longer text labels
:::

::: warning Caution
![Snackbar with a slightly transparent container and a clearly visible text label.](/assets/fe1932dc-lwoyc9yp-14.BIDzFlZB.webp)

An app can apply slight transparency to the container background, as long as text remains clearly legible
:::

::: danger Don't
![](/assets/793e0ac5-lwoydoed-15.BdQs6ST-.webp)

Avoid significantly altering the shape of a snackbar container
:::

### Action

Snackbars can display a single text button that lets users take action on a process performed by the app. Snackbars shouldn’t be the only way to access a core use case, to make an app usable.

![A snackbar container with rounded corners.](/assets/7d02e621-lwoyf085-16.D_gNIeH2.webp)

To distinguish the action from the text label, text buttons should display colored text

::: tip Do
![Snackbar with a long text button displayed on a third line.](/assets/a09060fe-lxktjsxn-19.BtCJTMhd.webp)

If an action is long, it can be displayed on a third line
:::

::: tip Do
![Snackbar with a single text button labeled undo.](/assets/3f0ae5c8-lwoz8scg-20.It5ZuyMA.webp)

To allow users to amend choices, display an "Undo" action
:::

::: warning Caution
![Snackbar with a single text button labeled dismiss.](/assets/ff6b7215-lwoza8yz-21.DqiETy5b.webp)

A dismiss action is unnecessary, as snackbar disappears on their own by default
:::

## Placement

### At the bottom of a UI

Snackbars should be placed at the bottom of a UI, in front of the main content. In some cases, snackbars can be nudged upwards to avoid overlapping with other UI elements near the bottom, such as [FABs](../floating-action-button/overview.md "Floating action buttons (FABs) help people take primary actions.") or docked toolbars.

Avoid placing a snackbar in front of frequently used touch targets or navigation.

::: tip Do
![Snackbar appearing in front of photo content.](/assets/0e2facf9-m6aa5hcy-22.DXORYr4T.webp)

Place a snackbar in front of the main content
:::

::: danger Don't
![Snackbar placed in front of the navigation components.](/assets/763f2ba8-m6aa6688-23.DazMg2ej.webp)

Avoid placing snackbars in front of navigation components
:::

To ensure accessibility for keyboard users on the web, avoid positioning the snackbar in a way that completely obscures actionable elements. Blocking elements makes it difficult to know what is being focused and selected.

::: tip Do
![Thin snackbar in front of a focused element that is still visible.](/assets/b5a54fc6-mkvpb7sp-24.BJhCoiq4.webp)

Adjust the size of the snackbar to avoid blocking elements in focus
:::

::: danger Don't
![Larger snackbar that is obscuring a focused element.](/assets/a63e80ee-mkvpbire-25.BiIVSMR5.webp)

Don’t let the snackbar fully cover elements in focus
:::

Snackbars can span the entire width of the screen only when a UI does not use persistent navigation components like app bars or [navigation bars](../navigation-bar/overview.md "Navigation bars let people switch between UI views on smaller devices.").

Snackbars that span the entire width of a UI can push up [FABs](../floating-action-button/overview.md "Floating action buttons (FABs) help people take primary actions.") when they appear.

::: warning Caution
![Snackbar spanning the width of a mobile device is placed in front of the navigation components and FAB.](/assets/d00bedbe-m6aa171j-26.DGcgHG-t.webp)

Snackbars can span the entire width of a UI. However, they should not appear in front of navigation or other important UI elements like floating action buttons.
:::

**Snackbars and floating action buttons (FABs)**

Snackbars should appear above [FABs](../floating-action-button/overview.md "Floating action buttons (FABs) help people take primary actions.").

![Snackbar placed above a FAB on a mobile device.](/assets/f7eece11-m6aa25mm-27.aTXRonhB.webp)

Snackbar above a FAB

::: danger Don't
![Snackbar placed in front of a FAB on a mobile device.](/assets/b5d080fd-m6aa35y8-28.nQa1POQB.webp)

Don’t place a snackbar in front of a FAB
:::

::: danger Don't
![Snackbar placed behind a FAB on a mobile device.](/assets/6af64c83-m6aa41vd-29.BKHl7eLJ.webp)

Don’t place a snackbar behind a FAB
:::

## Responsive layout

### Compact breakpoint

In [compact breakpoints](../../foundations/layout/breakpoints/compact.md "Window widths smaller than 600dp, such as a phone in portrait orientation."), snackbars should expand vertically from 48dp to 64dp to accommodate one or two lines of text, while maintaining a  fixed distance from the leading, trailing, and bottom edges of the screen.

![Snackbar with its label text extending to the second line and maintaining fixed distance from the edges of a mobile device.](/assets/19394fbe-lxktk5oy-28.B3-1Wm93.webp)

### Medium & expanded breakpoints

On [medium](../../foundations/layout/breakpoints/medium.md "Window widths from 600dp to 839dp, such as a tablet or foldable in portrait orientation.") and [expanded breakpoints](../../foundations/layout/breakpoints/expanded.md "Window widths 840dp to 1199dp, such as a tablet or foldable in landscape orientation, or desktop."), like tablet and desktop, snackbars should scale horizontally to accommodate longer text strings, keeping in mind that the ideal line length for text is typically between 40-60 characters.

Snackbars use a flexible distance from the trailing edge of the screen. Whenever possible, snackbars on medium and large displays should aim for a single line of text with an  optional [button](../buttons/overview.md "Buttons let people take action and make choices with one tap.").

![A horizontally expanded snackbar placed at the bottom of screen on a medium-size device.](/assets/9d577e25-lwoztb40-29.BBenW3G2.webp)

In wider [layouts](../../foundations/layout/layout-overview/overview.md "Layout is the visual arrangement of elements on the screen."), snackbars can be left-aligned or center-aligned if they are consistently placed on the same spot at the bottom of the screen.

![A left-aligned snackbar placed at the bottom of screen on a medium-size device.](/assets/8a7b7743-lwozw4lz-30.C7iEqA0u.webp)

Left-aligned snackbar

![A center-aligned snackbar placed at the bottom of screen on a medium-size device.](/assets/1f4a1742-lwozx768-31.2bXUKRqR.webp)

Center-aligned snackbar

::: danger Don't
![Snackbar displayed at the left edge of the screen, near the bottom, on a medium-sized device.](/assets/00c3183d-mkvpdu5k-34.c34AvbGw.webp)

Don’t place snackbars flush to one edge of the layout
:::

::: danger Don't
![2 snackbars placed side-by-side at the bottom of the screen on a medium-size device.](/assets/b3c8f93a-mkvpefif-35.BJE8ovZr.webp)

Don’t place consecutive snackbars side by side or next to one another
:::

## Behavior

### Appearing and disappearing

Snackbars appear without warning, but they don’t block users from interacting with page content.

Snackbars without actions can auto-dismiss after 4–10 seconds, depending on platform. Avoid using auto-dismissing snackbars on web unless there's also inline feedback.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwp03p7p-GM3-Components-Snackbar-Guidelines-1-v01.mp4?alt=media" aria-label="Snackbar without an action button appearing and disappearing within 4 seconds from the screen of a mobile device."></video>

Snackbars with actions should remain on the screen until the user takes an action on the snackbar, or dismisses it.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fm3%2Fimages%2Fm7ca02x7-m6f92ux5-GM3-Components-Snackbar-Behavior-1-v01.mp4?alt=media" aria-label="Snackbars with actions should remain on the screen until the user takes an action on the snackbar, or dismisses it."></video>

### Consecutive snackbars

Consecutive snackbars must appear one at a time. 

Snackbars without actions appear and disappear automatically, while those with actions remain on screen until dismissed. However, a snackbar with updated information can immediately replace an outdated snackbar.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwp06c42-GM3-Components-Snackbar-Guidelines-2-4-v02.mp4?alt=media" aria-label="Two snackbars appear sequentially on a mobile device. The first includes an action button."></video>

::: danger Don't
<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwp08dxf-GM3-Components-Snackbar-Guidelines-3-v01.mp4?alt=media" aria-label="2 snackbars appear sequentially on a mobile device and are stacked on top of one another. The first includes an action button."></video>

Don’t stack snackbars on top of one another
:::

::: danger Don't
<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwp0a03k-GM3-Components-Snackbar-Guidelines-2-3-v01.mp4?alt=media" aria-label="FAB's position is displaced when a snackbar enters the screen of a mobile device."></video>

Don’t animate other components along with snackbar animations, such as the floating action button
:::
