Skip to content
Log in

List item styling reference

On this page

List items are the rows operators pick from, or read, in a list on a POS screen, such as the registers to choose from at sign-in or the shipping rates for a delivery. A list item can start with an image, a dot, or a checkbox, show a name with details under it, and end with a value, such as a register’s status or a rate’s price. You can change the list item fill, corners, height, padding, the space between the image, name, and value, the color of the dot, etc. Follow the POS styling API rules when you style list items.

Where a list item appears

List items appear in these places:

  • The registers to choose from when signing in to a register
  • The staff to choose from when starting or unlocking a session, and when choosing who assisted with a sale
  • The shipping rates for a delivery from the cart
  • The address suggestions while an address is typed
  • The account credits and the Latitude payment plans at checkout
  • A product’s variants, and the product at the top of a rental’s booking
  • The items chosen in a bundle
  • The status filters on a station’s tickets
  • The stations, registers, and printers when moving tickets or setting up a station

The name and value in a list item are text groups, and a product’s price is a product price. Style them with those properties. The image at the start of a row is a media image.

Parts

Part What it is Available from
list-item-root The whole row, with the fill and corners. v22.0.18
list-item-primary The row’s name, with the details and caption under it. It is a text group, so style it with the text group properties. v22.0.18
list-item-value The value at the end of a row, such as a register’s status or a shipping rate’s price, when the row has one. It is a text group, so style it with the text group properties. A product’s row ends with a price instead. v22.0.18
list-item-price The price at the end of a product’s row. It is a product price, so style it with the product price properties. v22.0.18
list-item-radio The dot at the start of a row in a list where operators pick one, which shows once the row is picked. The dot doesn’t show on some screens. v22.0.18
list-item-checkbox The checkbox at the start of a row in a list where operators pick several. v22.0.18

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

Attributes

To style one kind of row, narrow list-item-root by these attributes, inside :where().

Attribute Values Default Available from
data-size base, large base v22.0.18
data-selected true, false false v22.0.18
data-disabled true, false false v22.0.18
  • data-size sets how roomy the row is. Large rows are taller, with more padding and rounder corners. Product rows are large, and so are most rows in a list where operators pick one. The rest are base. The size of the row’s text comes from the text group, not the row.
  • data-selected is true on the row an operator picked, and on the address suggestion the keyboard is on.
  • data-disabled is true on a row that is turned off, so operators can’t pick or press it.

A picked row in a list where operators pick one has an outline. A turned-off row has a shaded fill and muted text. A background-color you set on list-item-root applies to every row, including turned-off, hovered, and pressed rows, so narrow by data-selected or data-disabled to keep them apart. A fill set with --sc-list-item-bg-color doesn’t apply to turned-off, hovered, and pressed rows, which keep the standard shades.

Component properties

Set these on list-item-root or on :root. Each size has different defaults, and a property you set replaces the default at both sizes, so narrow by data-size to change one size.

Property What it sets Default Available from
--sc-list-item-bg-color The row’s fill. A pressed, hovered, or turned-off row has a different shade. var(--sc-color-surface-overlay) v22.0.18
--sc-list-item-min-height The minimum height of a row. 60px, 70px on a large row v22.0.18
--sc-list-item-gap The space between the row’s image, name, and value. var(--sc-spacing-2), var(--sc-spacing-3) on a large row v22.0.18
--sc-list-item-radius The row’s corners. var(--sc-spacing-3), 16px on a large row v22.0.18
--sc-list-item-padding The padding above and below the row’s content, and at the sides when the row starts with an image. var(--sc-spacing-2), var(--sc-spacing-3) on a large row v22.0.18
--sc-list-item-inset The padding at the row’s sides. When set, it also replaces the side padding of a row that starts with an image. var(--sc-spacing-3), var(--sc-spacing-4) on a large row, and the vertical padding on a row that starts with an image v22.0.18

Examples

Each example is tested against the POS on every change.

“Make the rows white, with rounder corners.”

```css

part~=’list-item-root’ { –sc-list-item-bg-color: #ffffff; –sc-list-item-radius: 20px; } ```

“Make the large rows shorter, and leave the rest.” Narrow by the size:

```css

–sc-list-item-min-height: 56px; –sc-list-item-padding: 8px; } ```

“Tint the row an operator picked, and color the dot.”

```css

background-color: #eef4ff; }

[part~=’list-item-radio’] { background-color: #0b5394; } ```

“Make the names in the rows bigger.” The name is a text group, so set the text group property:

```css

[part~=’list-item-primary’] { –sc-text-group-primary-size: 18px; } ```

“Color a product’s original price red.”

```css

[part~=’list-item-price’] { –sc-product-price-original-color: #b42318; } ```

What can’t be styled yet

  • One list apart from the others, such as the shipping rates, since no list has a name yet
  • The image or icon at the start of a row, and the badge on it, through the list item parts, since they have no list item part name. Style the image with the media image properties
  • What a screen adds at the end of a row or after a product’s price, such as a tag or a quantity stepper
  • A row that operators can press apart from one that only shows something, or a row whose record has expired
  • The outline around a picked row, apart from the fill
  • The shade of a hovered or pressed row over a fill you set: a --sc-list-item-bg-color fill is replaced by the shade rather than darkened, and a background-color you set hides the shade

Retired

None yet.

Was this article helpful?

Was this article helpful?