Skip to content
Log in

List button styling reference

On this page

POS users tap list buttons to move between POS functions. List buttons appear in the sidebar, in the top bar, and in menus such as the More menu. Use this reference to style list buttons, following the POS styling API rules.

Where list buttons appear

  • Each action item in the sidebar and the top bar
  • The More button, which opens the remaining actions
  • The button that collapses the sidebar
  • The cart button on the top bar
  • The items in a menu, such as the items a group opens

An item that opens a group shows a chevron. The item for the page the user is on is highlighted.

Parts of a list button

Part What it is Available from
list-button-root The whole item, with the fill and corners. v22.0.14
list-button-media The box before the label that holds the icon or picture, the badge, and the spinner while the item loads. v22.0.14
list-button-leading-icon The Icon in the media, when the item shows one. v22.0.14
list-button-badge The badge pinned to the media, when it has one. It is a Badge, so it reads the Badge properties. v22.0.14
list-button-label The text. Not shown on an icon-only item. v22.0.14
list-button-chevron The chevron on an item that opens a group, which turns while the group is open. v22.0.14
list-button-tooltip The label an icon-only item shows on hover and keyboard focus. v22.0.14
list-button-loading-indicator The spinner that stands in for the media while the item loads. v22.0.14

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

Attributes of a list button

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

Attribute Values Default Available from
data-variant text, tonal text v22.0.14
data-layout row, stacked, icon row v22.0.14
  • text — no fill of its own. The page a person is on takes the primary soft fill
  • tonal — a fill, an action’s configured color or the primary soft pair. The page a person is on wears a ring
  • row — the label beside the media
  • stacked — a small label under the media, in a narrow rail
  • icon — the media alone, with the label as the item’s name

Component properties

Set these on list-button-root to change every item, or narrow by an attribute to change one kind. An action item with a configured color keeps it over the fill and color properties, as an action tile does on a card. The items in a colored group’s menu take the group’s text color, unless a color is set on them. The fill also reaches the button of an open group, in place of the fill it takes from a floating menu under it, so the two no longer match.

Property What it sets Default Available from
--sc-list-button-bg The fill of the item, under an action’s configured color. The page a person is on keeps the primary soft fill on a text item. none v22.0.14
--sc-list-button-color The text and icon color, under an action’s configured color. none v22.0.14
--sc-list-button-max-width The widest a stacked item grows, so a long label truncates instead of widening the rail. 64px v22.0.14

List button examples

Each example is tested against the POS on every change.

“Make the navigation’s text darker.”

```css

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

“Give the plain items a light fill, with dark text.”

```css

–sc-list-button-bg: #e3e8ef; –sc-list-button-color: #1f2933; } ```

“Let the items in the narrow rail grow wider.”

```css

–sc-list-button-max-width: 80px; } ```

“Make the labels bolder.”

```css

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

“Color the icons.”

```css

[part~=’list-button-leading-icon’] { color: #0b5394; } ```

What can’t be styled yet

  • An action item’s configured color, which sits over the fill and color properties
  • The current page, an open group, a loading item, and a disabled item, which have no listed attribute yet
  • The wash over an item while it’s hovered or pressed

Retired

None yet.

Was this article helpful?

Was this article helpful?