{"title":"Button styling reference","slug":"pos-button-styling-reference","url":"https://support.storeconnect.com/articles/pos-button-styling-reference","url_markdown":"https://support.storeconnect.com/articles/pos-button-styling-reference.md","subtitle":null,"summary":"Every part, named button, attribute, and component property for restyling the POS\u0026#39;s buttons with CSS, including the cart\u0026#39;s Pay and Charge buttons, with tested examples such as recoloring only the Pay button, and the list of what has no part yet.","type":"Developer_Documentation","video_url":"","keywords":"pos button css, button-root, button-label, cart-checkout-button, pay button color, --sc-button-bg, data-variant, data-tone, data-size, pos styling api, pos parts","last_modified":"2026-11-11T02:14:50+0000","body_markdown":"A Button is a standalone action a person can press, labeled with text, an icon, or both.\nFollow the [POS styling API](pos-styling-api#rules) rules when styling it.\n\n## Where it appears\n\nButtons appear on most screens of the POS, including the Pay button in the cart, the buttons on\nthe payment screens, and the buttons in most dialogs. Some older screens still use a button\nwith no parts, and styles written against these parts do not reach them. Items in a nav or\nmenu are not Buttons; they are [list buttons](pos-list-button-styling-reference).\n\n## Parts\n\n| Part | What it is | Available from |\n| --- | --- | --- |\n| `button-root` | The whole button, with the fill and corners. | v22.0.4 |\n| `button-label` | The text. Not shown on an icon-only button. | v22.0.4 |\n| `button-leading-icon` | The icon before the text, or the icon of an icon-only button. | v22.0.4 |\n| `button-trailing-icon` | The icon after the text, such as a chevron. | v22.0.4 |\n| `button-badge` | The badge pinned to the corner, when the button has one. | v22.0.4 |\n| `button-tooltip` | The name an icon-only button shows on hover and keyboard focus. | v22.0.4 |\n| `button-loading-indicator` | What shows in place of the label and icons while the button is loading. | v22.0.4 |\n\nThe **Available from** column shows the first release that carries the name.\n\n## Named buttons\n\nSome buttons have a name of their own beside `button-root`, so you can style one without\nchanging every button. A name can also come first in a selector, to reach a part inside that\none button.\n\n| Name | What it is | Available from |\n| --- | --- | --- |\n| `cart-checkout-button` | The button in the cart that opens the full checkout, such as the Pay button. | v22.0.4 |\n| `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 |\n\n## Attributes\n\nNarrow `button-root` by one of these, inside `:where()`, to style one kind of button.\n\n| Attribute | Values | Default | Available from |\n| --- | --- | --- | --- |\n| `data-variant` | `filled`, `tonal`, `text` | `tonal` | v22.0.4 |\n| `data-tone` | `neutral`, `primary`, `critical`, `success` | `neutral` | v22.0.4 |\n| `data-size` | `tiny`, `small`, `base`, `large`, `xlarge`, `xxlarge` | `base` | v22.0.4 |\n\n## Component properties\n\nSet these on `button-root` to change every button, or on a named button's part to change\none.\n\n| Property | What it sets | Default | Available from |\n| --- | --- | --- | --- |\n| `--sc-button-bg` | The button's fill, in place of the variant's, such as an action's configured color. | none | v22.0.4 |\n| `--sc-button-color` | The text and icon color, in place of the variant's. | none | v22.0.4 |\n| `--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 |\n| `--sc-button-icon-size` | The width and height of the icons, in place of the size's. | none | v22.0.4 |\n| `--sc-button-icon-stroke` | The stroke width of the icons, in place of the size's. | none | v22.0.4 |\n| `--sc-button-icon-color` | The icons' color, in place of the text color. | none | v22.0.4 |\n\n## Examples\n\nEach example is tested against the POS on every change.\n\n**\"Make the buttons our brand color.\"** Set the component properties on the whole button:\n\n```css\n\n[part~='button-root'] {\n  --sc-button-bg: #0b5394;\n  --sc-button-color: #ffffff;\n}\n```\n\n**\"Make the button text bolder.\"**\n\n```css\n\n[part~='button-label'] {\n  font-weight: 700;\n  letter-spacing: 0.5px;\n}\n```\n\n**\"Make the icons a different color from the text.\"** The icons draw in the text color\nunless a property says otherwise:\n\n```css\n\n[part~='button-root'] {\n  --sc-button-icon-color: #0b5394;\n}\n```\n\n**\"Make the icons in filled buttons thinner.\"** Narrow the whole button by the variant, and\nset the property there:\n\n```css\n\n[part~='button-root']:where([data-variant='filled']) {\n  --sc-button-icon-stroke: 1.5;\n}\n```\n\n**\"Make primary buttons darker.\"** Narrow by the variant as well as the tone. Every kind of\nbutton reads `--sc-button-bg`, so setting it by tone alone would give primary text buttons a\nfill:\n\n```css\n\n[part~='button-root']:where([data-variant='filled']):where([data-tone='primary']) {\n  --sc-button-bg: #083b6b;\n}\n```\n\n**\"Make the icons in large buttons bigger.\"** Each size has an icon size of its own, and\nthe property replaces all of them unless narrowed by size:\n\n```css\n\n[part~='button-root']:where([data-size='large']) {\n  --sc-button-icon-size: 28px;\n}\n```\n\n**\"Make filled buttons lighter while pressed.\"** A state goes last, and the property applies\nin that state only:\n\n```css\n\n[part~='button-root']:where([data-variant='filled']):active {\n  --sc-button-bg: #3b7dd8;\n}\n```\n\n**\"Take the shadow off the badges on buttons.\"**\n\n```css\n\n[part~='button-badge'] {\n  box-shadow: none;\n}\n```\n\n**\"Make the tooltips dark, and the loading indicator our brand color.\"**\n\n```css\n\n[part~='button-tooltip'] {\n  background-color: #1f2933;\n  color: #ffffff;\n}\n\n[part~='button-loading-indicator'] {\n  color: #0b5394;\n}\n```\n\n**\"Make the keyboard focus ring thicker.\"** Keep it visible:\n\n```css\n\n[part~='button-root']:focus-visible {\n  outline-color: #0b5394;\n  outline-style: solid;\n  outline-width: 3px;\n}\n```\n\n**\"Make only the Pay button green.\"** Use the button's name, so other buttons keep their\ncolor:\n\n```css\n\n[part~='cart-checkout-button'] {\n  --sc-button-bg: #1a7f37;\n}\n```\n\n**\"Make only the Pay button's text bigger.\"** Put the name first, then the part inside it:\n\n```css\n\n[part~='cart-checkout-button'] [part~='button-label'] {\n  font-size: 18px;\n}\n```\n\n## What can't be styled yet\n\n-   One particular button that has no name of its own.\n-   Colors the POS sets on a button for where it sits, which win over yours: the customer\n    button's colors in the cart, the text color of the buttons on the checkout bar, and the\n    fill of the buttons that expand and collapse cart items.\n-   The hover shading of the icon-only button at the end of an order's item or bundle row,\n    which the POS turns on while the row is hovered and which wins over a\n    `--sc-button-state` you set.\n\nIf you need one of these, raise a [support case](manage-your-support-cases) that names the\nscreen and the button.\n\n## Retired\n\nNone yet. A part, property, or attribute value is retired before it is removed: it is listed\nhere with what replaces it and the major release that removes it, and it keeps working until\nthat release. See [When parts change](pos-styling-api#when-parts-change)."}