Skip to content
Log in

Menu button styling reference

On this page

Menu buttons are the rows of options that operators tap on a POS screen, such as the payment methods at checkout and the options in the cart menu. You can change menu button colors and text, the setting or number shown at the end of a menu button, etc. Follow the POS styling API rules when you style menu buttons.

Where a menu button appears

Menu buttons appear in these places:

  • The entries in the cart menu
  • The payment methods at checkout
  • The reasons for canceling an order
  • The Back button and the secondary action buttons above a list of records
  • The Filters button on a narrow screen
  • Every dropdown and the options it opens, such as sort and filters above a list of records, and the discount and pricing pickers in the cart
  • The items in the small menus that open from an item on an order or a station ticket

Parts

Part What it is Available from
menu-button-root The whole row, with the fill and corners. v22.0.15
menu-button-label The row’s main text. v22.0.15
menu-button-supporting-text The smaller second line above or below the label, when the row has one. v22.0.15
menu-button-value What the row is set to, shown at the end with an icon when it has one, such as the coupon on a cart. v22.0.15
menu-button-count The count at the end of the row, when it is above zero. v22.0.15

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

Attributes

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

Attribute Values Default Available from
data-variant filled, tonal, text text v22.0.15
data-tone neutral, primary, critical, success neutral v22.0.15
data-size tiny, small, base, large, xlarge, xxlarge base v22.0.15
  • data-variant — how much the row stands out. A text row has no fill, a tonal row wears the tone’s soft fill, and a filled row the strong one. The cart menu’s entries are text, and the payment methods are tonal
  • data-tone — what the row means, which sets the colors. The payment methods are primary
  • data-size — the least height of the row, the type, and the icon size. A row with a second line of text grows taller

Component properties

Set these on menu-button-root to change every row, or narrow by an attribute to change one kind. An action with a configured color, such as the secondary action above a list of records, keeps it over both properties.

Property What it sets Default Available from
--sc-menu-button-bg The row’s fill, in place of the variant’s, under an action’s configured color. none v22.0.15
--sc-menu-button-color The text and icon color, in place of the variant’s, under an action’s configured color. none v22.0.15

Examples

Each example is tested against the POS on every change.

“Make the rows’ text darker.”

```css

part~=’menu-button-root’ { –sc-menu-button-color: #1f2933; } ```

“Give the payment methods our brand color.” They are the tonal, primary rows:

```css

–sc-menu-button-bg: #0b5394; –sc-menu-button-color: #ffffff; } ```

“Make the labels bolder.”

```css

[part~=’menu-button-label’] { font-weight: 600; } ```

“Make the second line of text smaller.”

```css

[part~=’menu-button-supporting-text’] { font-size: 12px; } ```

“Show what a row is set to in our brand color.” This also recolors a value that needs attention, such as a fulfillment that requires attention in the cart menu, which otherwise shows in the critical color:

```css

[part~=’menu-button-value’] { color: #0b5394; opacity: 1; } ```

“Make the counts dark.”

```css

[part~=’menu-button-count’] { background-color: #1f2933; color: #ffffff; } ```

What can’t be styled yet

  • One row on its own, such as one entry of the cart menu, since no row has a name yet
  • An action’s configured color, which sits over the fill and color properties
  • The row that is picked out of a set, such as the chosen payment method, and the dot it shows, which have no listed attribute or part yet
  • A value that needs attention, apart from the other values
  • The icons before and after a row’s text, which have no parts yet
  • The wash over a row while it’s hovered or pressed

Retired

None yet.

Was this article helpful?

Was this article helpful?