Skip to main content
The block uses your shop’s checkout design from the Style Center. Each page can change a small set of values on top of it with appearance: colour mode, colours, font, size, radius and density. The block checks every value. It never takes raw CSS from your page.
With Shoppex.mount, pass appearance as an object, and call update({ appearance }) to restyle the open block.

Values

A key you leave out keeps the Style Center value. Hex colours are #rgb or #rrggbb. With mode: 'auto', a colour must pass its contrast check in both light and dark.

Fonts

  • A font from the list: Inter, Geist, Manrope, Plus Jakarta Sans, DM Sans, Space Grotesk, Sora, IBM Plex Sans, JetBrains Mono, Arial, System UI.
  • A Google font: { google: 'Source Serif 4' }. Letters, digits, spaces, +, - and _, up to 60 characters. Shoppex builds the Google Fonts address.
  • 'inherit': the script reads the first font family of the block’s container and the block uses it if it is on the list above or on Google Fonts. A font your page loads from its own files is not available inside the frame. Then the block keeps the Style Center font and sends a warning.

Values the block does not use

A value that fails its check is not applied. That key keeps the Style Center value, and your page gets a warning event once per key:
Shoppex.mount and update refuse an appearance with a top-level key that is not in the table before anything reaches the block: mount reports invalid_options, and update logs the reason and changes nothing.

Order of precedence

  1. Your page’s appearance sets the keys it names.
  2. Everything else comes from the checkout design: once the buyer has an invoice, from the design saved with that invoice, before that from your shop’s Style Center.
  3. The Shoppex default fills what is still unset.
Card fields from the payment providers follow the same colours, font and radius where the provider supports it.

Examples

Light, with your brand colour:
Dark:
Transparent on a dark section of your page:

Custom CSS

appearance covers what most pages need. For more, add Custom CSS to your checkout design in the Style Center. It applies to the hosted checkout, the Buy Button and Elements. Custom CSS is checked against an allowlist when you save, and again when the checkout renders. Selectors. Every selector is exactly one slot, [data-spx-slot="…"]. It can add one state, [data-state="…"], and one of :hover, :focus-visible or :disabled. No element names, IDs, classes or descendants. Each part of a comma list is checked on its own. Rules sit at the top level or inside one @media or @supports block.
Properties you can set: colours, backgrounds, borders and border radius, box-shadow, outlines, font-family, font-weight, font-style, font-size (12 to 64 pixels), letter-spacing, line-height, text-transform, text-decoration, padding, margin, gaps, and colour transitions. Every other property is refused. Never allowed, on any slot: position, inset and top/right/bottom/left, z-index, transform, translate, scale, rotate, content, clip, clip-path, mask and its family, filter, backdrop-filter, pointer-events, visibility, display, animation and its family, opacity and mix-blend-mode. Each of them can hide, move, cover or fake the total or the pay button. Protected slots take only color, background-color, font-family, font-weight, font-style and font-size. They are the parts a buyer relies on: the product title and price, the total, the pay buttons, payment methods, payment notices, the terms and the status screens. A text colour on a protected slot must be fully opaque. A theme saved before these rules keeps working: the checkout leaves out the rules that break them, and the Style Center shows which ones.