Skip to main content

Introduction

You can customise the appearance of the web components to match your branding in two ways:
  1. Dashboard settings — Use the Customisation page in Settings > Web Components to set colours, card styles, border radius, and more — no code required.
  2. CSS overrides — For more control, add custom CSS to your website using CSS variables and CSS parts (described below).
Most stores only need the dashboard settings. CSS overrides are optional and recommended only if you need fine-grained control that goes beyond what the dashboard offers. If you do use CSS, ask your web developer for help.
We use TailwindCSS to style the web components, which are isolated from your global CSS so that they do not affect the rest of your website. There are two ways to customise the styling:
  1. CSS Variables - For simple changes like colours, border radius, and font size. Override a few variables and all components update automatically. This is the quickest way to match your brand colours.
  2. CSS Parts - For more in-depth control over individual elements within components. Use the ::part() selector to target specific buttons, icons, text, and other elements with full CSS flexibility.
Most sites only need CSS variables. Use parts when you need fine-grained control over specific elements.

CSS Variables

You can override the default colours, border radius, and font size used by all web components by setting CSS custom properties (variables) on your page. These variables are defined on the :host selector and can be overridden globally.

Example

Colour Variables - Primary

Colour Variables - Secondary

Colour Variables - Button Borders

Colour Variables - Text

Colour Variables - Backgrounds

Colour Variables - Borders

Colour Variables - Status

Colour Variables - Badges

Colour Variables - Inputs

Border Radius Variables

Font Size Variable

CSS Parts

We use the part attribute to style individual elements within the web components. The format is always web-component::part(element-name).

Examples

This CSS would target the button within the add to cart component, using Tailwind classes that exist with your own CSS styles.
And this CSS would target the cart icon of the cart icon component using traditional CSS.
Because of how the web components are structured and how part works, we may use the same name for the same part in different components. For example, the --marzipan-spinner part is used in multiple components. However you must target each part separately:

Available parts

Available parts are listed under each component’s Styling section.