---
title: "Button styling reference"
source: https://support.storeconnect.com/articles/pos-button-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.
---
# Button styling reference

A Button is a standalone action a person can press, labeled with text, an icon, or both.
Follow the [POS styling API](pos-styling-api#rules) rules when styling it.

## Where it appears

Buttons appear on most screens of the POS, including the Pay button in the cart, the buttons on
the payment screens, and the buttons in most dialogs. Some older screens still use a button
with no parts, and styles written against these parts do not reach them. Items in a nav or
menu are not Buttons; they are [list buttons](pos-list-button-styling-reference).

## Parts

| Part | What it is | Available from |
| --- | --- | --- |
| `button-root` | The whole button, with the fill and corners. | v22.0.4 |
| `button-label` | The text. Not shown on an icon-only button. | v22.0.4 |
| `button-leading-icon` | The icon before the text, or the icon of an icon-only button. | v22.0.4 |
| `button-trailing-icon` | The icon after the text, such as a chevron. | v22.0.4 |
| `button-badge` | The badge pinned to the corner, when the button has one. | v22.0.4 |
| `button-tooltip` | The name an icon-only button shows on hover and keyboard focus. | v22.0.4 |
| `button-loading-indicator` | What shows in place of the label and icons while the button is loading. | v22.0.4 |

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

## Named buttons

Some buttons have a name of their own beside `button-root`, so you can style one without
changing every button. A name can also come first in a selector, to reach a part inside that
one button.

| Name | What it is | Available from |
| --- | --- | --- |
| `cart-checkout-button` | The button in the cart that opens the full checkout, such as the Pay button. | v22.0.4 |
| `cart-fast-checkout-button` | The button in the cart that takes payment in one tap, labeled Charge, when fast checkout is on. | v22.0.4 |

## Attributes

Narrow `button-root` by one of these, inside `:where()`, to style one kind of button.

| Attribute | Values | Default | Available from |
| --- | --- | --- | --- |
| `data-variant` | `filled`, `tonal`, `text` | `tonal` | v22.0.4 |
| `data-tone` | `neutral`, `primary`, `critical`, `success` | `neutral` | v22.0.4 |
| `data-size` | `tiny`, `small`, `base`, `large`, `xlarge`, `xxlarge` | `base` | v22.0.4 |

## Component properties

Set these on `button-root` to change every button, or on a named button's part to change
one.

| Property | What it sets | Default | Available from |
| --- | --- | --- | --- |
| `--sc-button-bg` | The button's fill, in place of the variant's, such as an action's configured color. | none | v22.0.4 |
| `--sc-button-color` | The text and icon color, in place of the variant's. | none | v22.0.4 |
| `--sc-button-state` | How strongly the hover and press shading shows, from 0 to 1, such as to light a button while the parent is hovered. | none | v22.0.4 |
| `--sc-button-icon-size` | The width and height of the icons, in place of the size's. | none | v22.0.4 |
| `--sc-button-icon-stroke` | The stroke width of the icons, in place of the size's. | none | v22.0.4 |
| `--sc-button-icon-color` | The icons' color, in place of the text color. | none | v22.0.4 |

## Examples

Each example is tested against the POS on every change.

**"Make the buttons our brand color."** Set the component properties on the whole button:

```css

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

**"Make the button text bolder."**

```css

[part~='button-label'] {
  font-weight: 700;
  letter-spacing: 0.5px;
}
```

**"Make the icons a different color from the text."** The icons draw in the text color
unless a property says otherwise:

```css

[part~='button-root'] {
  --sc-button-icon-color: #0b5394;
}
```

**"Make the icons in filled buttons thinner."** Narrow the whole button by the variant, and
set the property there:

```css

[part~='button-root']:where([data-variant='filled']) {
  --sc-button-icon-stroke: 1.5;
}
```

**"Make primary buttons darker."** Narrow by the variant as well as the tone. Every kind of
button reads `--sc-button-bg`, so setting it by tone alone would give primary text buttons a
fill:

```css

[part~='button-root']:where([data-variant='filled']):where([data-tone='primary']) {
  --sc-button-bg: #083b6b;
}
```

**"Make the icons in large buttons bigger."** Each size has an icon size of its own, and
the property replaces all of them unless narrowed by size:

```css

[part~='button-root']:where([data-size='large']) {
  --sc-button-icon-size: 28px;
}
```

**"Make filled buttons lighter while pressed."** A state goes last, and the property applies
in that state only:

```css

[part~='button-root']:where([data-variant='filled']):active {
  --sc-button-bg: #3b7dd8;
}
```

**"Take the shadow off the badges on buttons."**

```css

[part~='button-badge'] {
  box-shadow: none;
}
```

**"Make the tooltips dark, and the loading indicator our brand color."**

```css

[part~='button-tooltip'] {
  background-color: #1f2933;
  color: #ffffff;
}

[part~='button-loading-indicator'] {
  color: #0b5394;
}
```

**"Make the keyboard focus ring thicker."** Keep it visible:

```css

[part~='button-root']:focus-visible {
  outline-color: #0b5394;
  outline-style: solid;
  outline-width: 3px;
}
```

**"Make only the Pay button green."** Use the button's name, so other buttons keep their
color:

```css

[part~='cart-checkout-button'] {
  --sc-button-bg: #1a7f37;
}
```

**"Make only the Pay button's text bigger."** Put the name first, then the part inside it:

```css

[part~='cart-checkout-button'] [part~='button-label'] {
  font-size: 18px;
}
```

## What can't be styled yet

-   One particular button that has no name of its own.
-   Colors the POS sets on a button for where it sits, which win over yours: the customer
    button's colors in the cart, the text color of the buttons on the checkout bar, and the
    fill of the buttons that expand and collapse cart items.
-   The hover shading of the icon-only button at the end of an order's item or bundle row,
    which the POS turns on while the row is hovered and which wins over a
    `--sc-button-state` you set.

If you need one of these, raise a [support case](manage-your-support-cases) that names the
screen and the button.

## Retired

None yet. A part, property, or attribute value is retired before it is removed: it is listed
here with what replaces it and the major release that removes it, and it keeps working until
that release. See [When parts change](pos-styling-api#when-parts-change).

---

## 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-button-styling-reference