---
title: "Snack bar styling reference"
source: https://support.storeconnect.com/articles/pos-snack-bar-styling-reference
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# Snack bar styling reference

A snack bar tells POS users that something has just happened, such as an item added to the
cart or an order saved, without stopping what they are doing. It floats at the bottom of the
screen and closes itself. Use this reference to style snack bars, following the
[POS styling API](pos-styling-api#rules) rules.

## Where a snack bar appears

Snack bars appear at the bottom of the screen after an action that doesn't need the user to
respond. Each snack bar contains these things:

- A picture or an icon
- A line saying what happened
- At most an action button, an **Undo** button, and a close button

The buttons on a snack bar are [buttons](pos-button-styling-reference) named
`snack-bar-action` and `snack-bar-close`, and the number on the pictures is a badge named
`snack-bar-count`.

## Parts of a snack bar

| Part | What it is | Available from |
| --- | --- | --- |
| `snack-bar-root` | The whole notice: the layer over the screen that holds the glow and the bar. | v22.0.14 |
| `snack-bar-glow` | The glow behind the bar, spreading from the bottom corner of the screen. | v22.0.14 |
| `snack-bar-bar` | The pill that floats at the bottom of the screen, with the fill, corners, and shadow. | v22.0.14 |
| `snack-bar-media` | The box holding the stack of pictures before the message, when there are any. | v22.0.14 |
| `snack-bar-message` | The icon and the text together. | v22.0.14 |
| `snack-bar-icon` | The icon before the text, when there is one. | v22.0.14 |
| `snack-bar-text` | The text saying what happened. | v22.0.14 |
| `snack-bar-count` | The number on the pictures, when there is one. It is a Badge, so it reads the Badge properties. | v22.0.14 |
| `snack-bar-action` | The action button and the Undo button. Each is a Button, so it reads the Button properties. | v22.0.14 |
| `snack-bar-close` | The close button, when there is one. It is a Button, so it reads the Button properties. | v22.0.14 |

The **Available from** column shows the first release that carries the name.

## Component properties

Set these on `snack-bar-root`.

| Property | What it sets | Default | Available from |
| --- | --- | --- | --- |
| `--sc-snack-bar-max-width` | The widest the message grows before it wraps. | 200px | v22.0.14 |
| `--sc-snack-bar-inset-bottom` | The room the notice leaves at the bottom of the screen. Where the navigation is a bar at the bottom, the POS sets this to the bar's height, and a value you set replaces it. | 0px | v22.0.14 |

## Snack bar examples

Each example is tested against the POS on every change.

**"Let the notices' text run longer."**

```css

[part~='snack-bar-root'] {
  --sc-snack-bar-max-width: 320px;
}
```

**"Give the notices a dark fill with light text."**

```css

[part~='snack-bar-bar'] {
  background-color: #1f2933;
  color: #ffffff;
}
```

**"Make the action button stand out."**

```css

[part~='snack-bar-action'] {
  --sc-button-bg: #0b5394;
  --sc-button-color: #ffffff;
}
```

**"Turn the glow off."**

```css

[part~='snack-bar-glow'] {
  background: none;
}
```

## What can't be styled yet

- Where the bar sits on the screen, which is the bottom corner, apart from the room it leaves below
- The stack of pictures, which has no parts of its own yet
- The blur behind the bar, and how the notice slides in

## Retired

None yet.

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/pos-snack-bar-styling-reference