Numpad styling reference
On this page
The numpad is the area of a POS screen where operators type in the quantities, amounts, and tips that apply to a sale. You can resize the numpad keys, make them flatter, change the colors, etc. Follow the POS styling API rules when you style the numpad.
Where the numpad appears
The numpad appears in these places:
- The cash screen at checkout
- The custom amount and tip screens
- The sheet for entering a quantity
To style every numpad, target numpad-display, numpad-keys, and numpad-key. numpad-root wraps the display and keys only on the custom amount and tip screens.
Parts
| Part | What it is | Available from |
|---|---|---|
numpad-root |
The display and keys together, on the custom amount and tip screens only. | v22.0.15 |
numpad-display |
The read-out of what has been keyed, such as an amount. | v22.0.15 |
numpad-keys |
The grid of keys. | v22.0.15 |
numpad-key |
One key, and each button beside the keys that is drawn as one, such as a suggested amount. | v22.0.15 |
The Available from column shows the first release that carries the name.
Attributes
Narrow numpad-key by this, inside :where(), to style one kind of key.
| Attribute | Values | Default | Available from |
|---|---|---|---|
numpad-key[data-kind] |
digit, decimal, clear, confirm, amount |
digit |
v22.0.15 |
digit— a number keydecimal— the decimal pointclear— the key that removes the last digit, and the cash screen’s Resetconfirm— the key with a checkmark that applies what has been keyedamount— a suggested amount beside the keys on the cash screen, which takes the payment in one tap
Component properties
Set these on numpad-keys to change the keys of every keypad. --sc-numpad-shadow-size and
--sc-numpad-transition can also be set on numpad-key narrowed by the kind, to change one
kind of key; --sc-numpad-size can’t, since the grid’s cells keep their size. The buttons
beside the keys on the cash screen sit outside the grid, so they keep the POS’s values unless
you set the properties on :root.
| Property | What it sets | Default | Available from |
|---|---|---|---|
--sc-numpad-size |
The width and height of a key, which the grid and the buttons beside it follow. | 80px | v22.0.15 |
--sc-numpad-shadow-size |
The depth of the shadow under a key, which is how far the key moves when pressed. | 3px | v22.0.15 |
--sc-numpad-transition |
How long a key takes to move when pressed. | 50ms | v22.0.15 |
Examples
Each example is tested against the POS on every change.
“Make the keys smaller, everywhere.”
```css
:root { –sc-numpad-size: 64px; } ```
“Make the keys flatter.”
```css
[part~=’numpad-keys’] { –sc-numpad-shadow-size: 1px; } ```
“Make only the clear key flat.”
```css
–sc-numpad-shadow-size: 0px; } ```
“Give the number keys our brand color.”
```css
background-color: #0b5394; color: #ffffff; } ```
“Make the clear key stand out less.”
```css
color: #9aa5b1; } ```
“Make the keys’ numbers lighter.”
```css
part~=’numpad-key’ { font-weight: 400; } ```
“Color the amount in the display.”
```css
[part~=’numpad-display’] { color: #0b5394; } ```
What can’t be styled yet
- How the grid is laid out: the number of columns, the order of the keys, and the gaps between them
- A key while it’s hovered or pressed, apart from the other states: a fill you set on a key also replaces the fill it takes while pressed
- The prompt the display shows before anything is keyed
- The cards of suggested amounts the cash screen shows in place of the keys, and the Tip button beside the display, which have no parts yet
- A keypad a custom view draws from a copy of the POS’s markup, which has no parts unless the view writes them
Retired
None yet.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.