Storefronts
Styles and parts
Choose a style for a variant, change style later, the options per part, shape and colours on the components, tokens and your own styles.
A style is a design language for the whole storefront.
Where: + New variant in the designer's variant menu and the Theme tab in the designer.
Three layers
| Layer | Decides | Changed in |
|---|---|---|
| Tokens | Colours, fonts, base size and radii | The Theme tab in the designer |
| Style | How each part looks, drawn to fit together | Chosen when you make the variant |
| Options | The choices each part has within the style | Options on the component panel |
Choose a style
You choose a style when you make a new variant in the designer.
- Open the variant menu and press + New variant.
- Type a name under Name.
- Choose A style under Start from, then a style. Your own styles have · yours after the name.
- Press Create variant.
The variant gets the style's look and the templates for Collection pages, Product page and Text pages. The home page and your own pages are as customers see them.
| Style | Look |
|---|---|
| Classic | Cards, thumbnails and filters in a sidebar |
| Bold | Full-width banners, grey plates, split product page, a filter row and condensed uppercase headings |
| Boutique | Tall editorial cards, serif headings, a filter row and soft corners |
| Old school | Cream background, serif headings, terracotta buttons, cards with a tag line and filters in a sidebar |
| Retro | Mustard and ketchup, Archivo Black headings, round corners and a split product page with the image on the right |
Try a style in a new variant. The storefront does not change until you publish the variant. The style's templates come with placeholder text in the shop's language: Swedish when the shop's language is Swedish, otherwise English.
Change style later
A variant keeps the style it was made with. For another style, or one of your own, make a new variant from it with + New variant. The storefront doesn't change until you publish the new variant.
A variant gets a copy of the style when you make it. Later changes to the style reach the variant only when you press Reset to followed by the style's name, for example Reset to Bold. The button is under Style of this variant in the designer's Theme tab. It fetches the built-in style, never one of your saved styles, and asks you to confirm first.
| Part of the variant | Reset to |
|---|---|
| Colours, typography, corners, buttons, the parts' defaults and the theme CSS | Replaced |
| Logo, light logo, favicon, app icon, tagline and copyright line | Kept |
| The base size | Kept |
| The components' own styles | Kept |
| The menu's links and the heading over the products | Kept |
Changes you made to colours and parts are lost. ⌘Z brings them back.
Options per part
The style decides which looks and choices each part has. The list per component is under The components one by one.
You set the choices under Look and Options on the component panel, see The component panel. If the component has a saved style, the choice goes to the style. Otherwise it goes to the variant. The panel always shows the value the storefront uses.
Colour dots for variants
A variant option called Color, Colour or Färg shows as colour dots. Every value must read as a colour, for example black, red, grön or #E30613. Other options show as buttons.
Shape and colours on the component
Under Options on the component panel are the Shape and Colours blocks. They show the variant's tokens that the component uses. The code editor does not have the blocks. A saved component style never contains shape or theme colours.
Shape has chips for the corners. Which chips show depends on the component:
| Component | Chips | Steps |
|---|---|---|
| Product card | Photo corners. Only for Card and Editorial. Plate always has square corners | Square 0, Soft 8, Rounded 16, Very round 28 px, and the style's own value (Classic: 14) |
| Menu panel | Photo corners. Only with Links, products, contact and Products beside the links on | Same |
| Gallery | Photo corners for the large image. Thumbnail corners for the thumbnails, only with Thumbnails | Same |
| Product page, Collection page, Banners | Button corners | Square, Slight, Soft, Rounded, Pill |
The line under the chips says where the value applies:
- Photo corners: all product photos and category tiles without a picture.
- Thumbnail corners: the thumbnails and the corners of the page's sections.
- Button corners: every button in the storefront.
Classic has photo corners of 14 px and Boutique of 20 px. When the style has a value that is not a step, it gets a chip of its own named with the number. On an untouched variant, that chip is selected. When the variant has another value, set under More tokens, no chip is selected and the line shows the number. A value that differs from the style's gets reset.
Colours shows the theme colours the component uses:
| Component | Colours |
|---|---|
| Header | Header background, Header text, Header text over hero, Background, Foreground |
| Menu panel | Background, Foreground, Muted |
| Footer | Footer background, Footer text |
| Product card | Surface, Foreground |
| Product page | Primary, Primary text, Background, Foreground, Muted |
| Gallery | Surface, Muted, Foreground, Primary |
| Collection page | Background, Foreground, Muted, Primary, Primary text |
| Banners | Primary, Primary text |
Note: The colours under Colours are the variant's. A change here changes the colour everywhere it is used. Colours that apply to the component only go under the Design tab in the code editor.
Tokens in the Theme tab
The designer's Theme tab changes the variant's tokens without changing style.
| Block | Contents |
|---|---|
| Layout | Page width, the width of every page: XS 640, S 768, M 1024, L 1280, XL 1440, 2XL 1536, Full or your own width. M 1024 until you choose another. Sections on Page follow it. Side margin shows the side margin, 16, 24 and 32 px. It is not a choice. The checkout keeps its own frame. See Width |
| Colours | The variant's colours with names |
| Typography | Font pair and base size |
| Typography › Headings | Case (As typed, Uppercase, Capitalize), Tracking (0, 0.01, 0.02, 0.04 em or your own value) and Weight (400–800) for all headings |
| Buttons | Corners, weight, capitals, Font (body text or heading) and the buy button's colour |
| Custom CSS | Theme CSS on top of the style. See Your own CSS and head code |
| More tokens | The full token panel, see the next table |
Untouched heading choices follow the style and the line shows Style default. A value of your own gets reset, which puts back the style's choice.
| Under More tokens | Contents |
|---|---|
| Brand palette | 11 colours with roles: Paper, Ink, Primary, On primary, Ketchup, Mustard, Krasse, Bun, Brine, Muted, Char |
| Type system | Heading and body font family, the headings' case, tracking and weight, and the base size |
| Rhythm | The spacing scale's steps in px |
| Corner radii | SM, MD, LG and FULL. The same values as the chips under Shape |
| Elevation | 3 shadows |
| Animation tokens | 3 durations in ms and one easing |
| Your own settings | Your own tokens. The name hero-blur becomes var(--bunstack-token-hero-blur) in your CSS |
Save as your own style
Your own style saves the variant's style, options, colours, fonts, logo and theme CSS, and the sections of the three templates.
- Open the Theme tab in the designer.
- Press + Save current as my style under Your styles.
- Type a name and save. The name can't already be under Your styles.
The style saves every part's choices, not only the ones you changed. It also saves the sections of Collection pages, Product page and Text pages, see Page templates. Home and your own pages are not saved with it. A new variant made from the style starts with those sections. The style shows in every storefront of the workspace: under Your styles in the designer and under + New variant.
Update one of your own styles with the variant's look:
- Open the variant in the designer and the Theme tab.
- Press Update next to the style under Your styles.
- Press Update in the box.
The style takes the variant's look and keeps its name. The variant you have open doesn't change, and variants already made from the style keep their look. The style's old version isn't kept.
Delete your own style:
- Press the cross by the style.
- Press Continue.
- Type the style's name.
- Press Delete.
The style disappears for every storefront in the workspace. Storefronts that use it keep their look, since they have their own copy.
Your styles and Your header styles
| List | Contains | Saved | Applied |
|---|---|---|---|
| Your styles | The whole variant's style: colours, fonts, logo, every part's choices, theme CSS, the components' active styles and the sections of the three templates | With + Save current as my style in the Theme tab, and again with Update | When you make a new variant with + New variant |
| Your header styles and the matching lists | A style for one component: look, options, the Design tab and the code. Never the variant's colours, shape or logo | With Save as new style in the code editor | Under Look on the component panel. See The component panel |
Both lists belong to the workspace and show in every storefront. A style removed from a list changes no storefront that already uses it.