Skip to main content
Swish uses design tokens to control the visual appearance of every UI component. Pass tokens under ui.design, and the values are applied across the drawer, dialogs, buttons, and all other surfaces.

Colors

Tokens ending in Rgb take space-separated RGB triplets without the rgb() wrapper (e.g. "22 163 74"). Swish uses the raw values internally so it can apply opacity variations. overlayBackground and savedIconColor are plain CSS colors instead - pass any valid value ("rgba(0, 0, 0, 0.4)", "#ffffff").
To convert a hex color like #16A34A to an RGB triplet for the *Rgb tokens, drop the hash and convert each pair to decimal: 22 163 74. Don’t do this for overlayBackground or savedIconColor - they take the hex value as-is.

Typography

Typography tokens let you align Swish text with your store’s typeface and sizing. Tokens are grouped by text role: headings, body text, buttons, and badges.
Each role supports the same set of properties: Prefix with heading, text, button, or badge to target a specific role. For example, headingFontFamily sets the heading font while buttonFontFamily sets the button font.
Body text also has a textLineHeightParagraph token for longer text blocks like product descriptions.

Rounding

Control border radii across the UI. The borderRadiusScale token acts as a global multiplier - set it to 0 for sharp corners or increase it for rounder shapes.
For finer control, override individual component radii:

Sizes

Size tokens control the dimensions of buttons, icons, and images.

Component tokens

Component tokens give you fine-grained control over specific UI elements, so you only need to set them when a component should differ from the global style. Some derive from the global tokens above (for example productCardTitleColor and optionPillBackground resolve to textColorRgb and neutralButtonBackgroundRgb), but others carry their own default - product card titles are deliberately smaller and bolder than body text. Each table below states the default that applies.

Product card

Control the appearance of product titles on grid cards.
Style the bottom navigation bar in the drawer.

Option pill

Customize the variant selector pills on the product detail view.

Drawer

Control the drawer panel dimensions.

Save button

A placed save button comes in two looks, each with its own settings. On image is for buttons over product media - collection cards and image corners: an icon-only chip. On page is for buttons in the page flow - under Add to cart or in your theme’s button row: a heart with its label. Editing one look never changes the other. A placement picks its look with style, and collection placements are always On image. The hearts in the drawer and on the wishlist page follow the On image settings. Colors are plain CSS colors, so pass any valid value ("rgba(0, 0, 0, 0.15)", "#ff0000"). A token you leave unset keeps the look’s preset: On image is a #121212 heart on a white chip, filled once the item is saved; On page is a white heart and label on #121212, the heart filled once saved.

On image

On page

An on page button takes its height from the standard button tokens and its corners from the rounding tokens above, so it sits in your theme’s button row like one of its own. A placement’s own fill and size settings take priority over these tokens where they overlap. To swap the heart for another glyph, set ui.icons.save to your own SVG - the glyph is shared by both looks - see Icons for the format. To animate a save, set ui.saveButton.animation, which every save button plays whatever its look.

Image slider

Further reading