Style the POS
On this page
Use this process to change how the point of sale looks for your staff, for example to put your brand color through the app, or to color the buttons staff use most so they stand out on a busy counter.
The people using the POS are mostly your staff, so aim each change at helping them work faster and make fewer mistakes.
Work through these methods in order, and use the first one that does the job:
- Settings in Salesforce for action buttons and screens.
- Design tokens for colors, type, and sizes across the whole app.
- Component properties and parts for the components the app draws, such as the Pay button.
- Your own CSS in a view for markup you write yourself.
How POS design works explains the action groups, layouts, and views these settings belong to.
What you can change in Salesforce
| To change | Set | See |
|---|---|---|
| An action button’s color | Color on the POS Action Item | POS layouts |
| An action button’s icon or image | Icon or Image on the POS Action Item | POS icons reference |
| An action button’s label | Display Name on the POS Action Item | POS action groups |
| Whether a screen shows rows or cards | Page Type on the POS Layout (list or grid) |
POS layouts |
| Which fields a screen or card shows, and in what order | The layout fields on the POS Layout | POS layouts |
| What printed receipts and documents look like | A print template | POS print templates |
Not every button on the POS is an action item. Action buttons are the ones you configure: the sidebar and top bar, action group menus, and the primary and secondary buttons on a layout. Buttons that are part of the app itself take their colors from the design tokens, and the component properties let you restyle them one at a time.
Color an action button
- Open the POS Action Item record for the button.
- Set Color to a hex value, such as
#7B2D8E. - Select Save.
- Wait for the change to reach the POS, then reload the POS on the register.
The POS picks a readable text color and a hover shade to go with the color you set, so you do not need to choose them. A value it cannot read as a color is ignored, and the button keeps the default style.
The button now shows in the new color on the register, with light or dark text chosen to contrast with it.
Recolor the POS with design tokens
Design tokens are the named values the POS app and the components in it are styled from, such
as --sc-color-primary. The POS’s own styles read them, so changing a token’s value is how
you change the look of the whole app. You set them in a Style Block.
Before you start
- You need access to the Style Blocks list. If you cannot see it in the App Launcher, ask your Salesforce administrator for tab and object access.
- You need a register you can sign in to, so you can check the result.
Create a style block for the POS
- Go to the Style Blocks list (
s_c__Style_Block__c) and select New. - Enter a Name you will recognize later, such as “POS brand colors”.
- Set Store to the store the register belongs to.
- Check Active.
- Set Channels to
POS(stored aspos). Channels decides where the style block loads:Webis your online store andPOSis the point of sale app. LeaveWebout, so the values in this block do not also change your online store. - Check Global. A style block that is not global does not load in the POS.
- Set Media to
screen. -
Enter the token values on
:rootin Content, without<style>tags. This example sets a purple brand color with white text on it:```css
:root { –sc-color-primary: #6A1B9A; –sc-color-on-primary: #FFFFFF; } ```
- Select Save.
- Wait about two minutes for the change to reach the POS, then reload the POS on the register.
The prominent buttons, links, and active navigation now show in your brand color, with white text and icons on them.

How color tokens work
The color tokens come in pairs: a surface color, and an on- color for the text and icons
that sit on it. --sc-color-primary is the surface for the most prominent elements, such
as major buttons, and --sc-color-on-primary is the color of text and icons on top of it.
Primary marks the main action on a screen or component, such as the submit button on a form. Choose a primary color that draws the eye. A muted color can get lost against the other elements on screen.
Change both halves of a pair together. If the default primary is dark blue with white text and you change it to pale blue, the white text becomes unreadable.
How far a change reaches depends on the token. Changing --sc-color-primary changes every
element that uses the primary color, across every screen. To change one button, set
Color on the action item, or, for a button the app draws such as the Pay button, set
the component properties on the
button’s name.
The POS design tokens reference lists every pair and the type tokens.
:::note
POS tokens and your web theme’s CSS variables are separate sets, even where both start
with --sc-. The web theme’s own stylesheets don’t load in the POS, but a style block
does if Channels includes POS. A variable redefined in that block
applies in both, so where the two share a name, it changes both. Set a style block to one
channel to keep them apart.
:::
Restyle built-in components with properties and parts
Some of the components the POS draws carry names that are kept working between releases,
and the list grows as components are added. Each component reads component properties,
such as --sc-button-bg for a button’s fill. You set them on a part, which is a name the
POS puts on an element. A root part such as button-root reaches every instance, and a name
of its own, such as cart-checkout-button for the Pay button, reaches one. The
POS styling API lists the components that have
parts, and each one has a reference article with the parts, properties, and tested
examples.
Add the CSS to the same POS style block, below the :root block, or to a <style> element
in a view. These examples use the Button:
“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 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; } ```
Each component’s reference article, such as the
Button styling reference, lists every part and property,
the attributes that narrow a rule to one kind (for a button, data-variant, data-tone,
and data-size), and more tested examples.
The rules below are a summary. The full list is in the POS styling API.
- Use only the names the component’s reference lists. Class names, IDs, and the markup around a part are internal and can change in any release.
- Select a part with
[part~='name'], and never more than two parts: the component’s root part or name, a space, then a part inside it. - To style one kind of a component, narrow the root part by an attribute inside
:where(). - Set a property when one exists, and plain CSS only when none does.
- Change appearance only: color, background, border, radius, font, and inner padding.
- You do not need
!important. Your rule wins over the component’s own styles.
If you use an AI tool to write the CSS, give it the POS styling API and the reference article for each component you want to change, and ask it to use only the names listed there.
Style your own markup in a view
A POS view replaces part of a screen with your own HTML, and you own the
markup and CSS inside it. Give your elements class names of your own, and use the design
tokens for colors and type so your view matches the rest of the app. Put the CSS in a <style>
element in the view’s HTML Template:
```html
```
See CSS in a view for how a view’s styles apply.
Copying the app’s own markup or class names, such as sc:button, into your view works, but
it can stop working at any upgrade. Write your own markup and classes instead.
The app’s own classes and markup
The class names, IDs, element types, and structure of the POS app’s markup are internal. CSS that selects them can restyle the app today, but any release can change them, and the CSS then stops working or styles something else. Use the methods above instead.
If you already have CSS that selects the app’s own classes, check every screen it affects after each upgrade. If the element you need has no part yet, raise a support case that names the screen and the element and asks for one. The POS styling API lists the components that have parts.
What stays working at an upgrade
| Method | What is promised | At an upgrade |
|---|---|---|
| Settings in Salesforce | The POS draws the screens from your records. | Nothing to do. |
| Design tokens | The POS’s own styles read them, so a value you set reaches every screen that uses it. From TBD, tokens are part of the styling API. A token is removed or renamed only in a major release. The release notes give notice first, and the reference lists it with the replacement and the major release that removes it. | Read the release notes, and check the Retired design tokens section of the POS design tokens reference. |
| Properties and parts of a published component | Kept working. A name is removed or renamed only in a major release. The release notes give notice first, and the name is listed under Retired with the replacement and the major release that removes it. New names can arrive in any release. | Read the release notes, and check the Retired section of the component’s reference article. |
| Your own markup and CSS in a view | The markup is yours. The tokens and parts you read inside it follow their own rows. | Test the view. |
| The app’s own classes, IDs, and markup | Nothing. They can change in any release. | Check every affected screen, or move the rule to a part or property. |
If a screen looks wrong after a change
If a POS screen looks wrong after an upgrade or a change, uncheck Active on your POS style block, wait about two minutes for the change to reach the POS, and reload. If the screen is then correct, the style block was the cause.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.