Storefront
Create a great theme
Everything you need to design a theme people love to shop in and want to install: in the visual editor, or as code with the Sellstamp CLI.
Two ways to build a theme
Pick the path that fits how you work. Both end with a store your customers can shop in.
- In the visual editor
- No code. Start from one of our themes, shape it with the design panel and sections, and publish. Themes made this way can be listed on the theme marketplace for other merchants.
- As code
- Write templates in Liquid, Nunjucks, Twig or plain HTML, test them locally with the Sellstamp CLI, and upload them to your store. Ideal if you are bringing a theme from Shopify, SellAuth or Tebex, or want full control of the markup.
Parts 1 and 2 below cover each path. The quality rules, the checklist and publishing apply to both.
Part 1: Start from the closest theme
Open Storefront → Theme and browse the themes. Each one changes the structure of the store, not just its colours, so choose the one whose layout is closest to what you want, rather than the one with the nicest colours. Colours are the easiest thing to change later.
Applying a theme writes to your draft, so you can try as many as you like. Customers see nothing until you publish.
Set up the design system first
The design panel is your theme’s foundation. Set it before you touch individual sections, so every page inherits it.
- Typography: pick a heading face and a body face that pair well. Two families is plenty.
- Colour roles: set the background, text and accent. Keep body text at a contrast of at least 4.5:1 against its background.
- Surfaces and buttons: choose the card style, corner radius and button shape once, here, rather than per section.
- Layout and density: decide how wide and how airy the store feels.
- Header and motion: choose the header layout, and keep motion subtle.
Compose pages with sections
- Use live sections (product grid, category list, contact block) for anything that shows the catalogue. They always show real products and prices, in the customer's language.
- Give every page a job: home sells, the product page converts, about builds trust, FAQ removes doubt.
- Arrange the product page template carefully. Media, title, price, reviews, the buy form and delivery details are blocks you can order. Keep the price and the buy button visible without scrolling on a phone.
- Avoid image galleries and picture columns with no image in them. An empty one shows as a heading over blank space.
- Write layouts that work with any heading. Each store keeps its own main heading, so a theme must look good with a short one and a long one.
Make it look great on phones
Most shoppers will see your theme on a phone. Use the device tabs in the editor to check phone, tablet and desktop, and adjust padding and columns for each. Check the home page, a product page and the cart at phone width before every publish.
Add your own HTML and CSS
A custom code section accepts your own markup and styles when the built-in sections are not enough.
- Style with classes, not
idattributes, which are removed. - Your CSS only applies to its own section, so it is safe to experiment.
- Scripts, event handlers, frames and forms are removed. If you need JavaScript, build a code theme (Part 2).
- Add images through the media library and link them.
Part 2: Build a code theme
A code theme is a folder of templates and assets, uploaded as a zip. It renders your store’s browse pages: home, listings, product pages, blog and policies. Checkout, payment, orders, sign-in and the customer portal are always handled by Sellstamp, so they stay fast and secure whatever the theme does.
- Liquid
- Shopify's template language. Folders: layout/, templates/, sections/, snippets/, config/, locales/, assets/.
- Nunjucks
- SellAuth's template language. Folders: templates/, layouts/, snippets/, components/.
- Twig
- Tebex's template language. A layout.html extended by index.html, category.html, package.html and page.html.
- Static
- Plain HTML pages or the build output of a static site or single-page app.
The Sellstamp CLI (@sellstamp/cli, Node 22 or later) checks and previews your theme as you build it. Its offline commands (check, lint, pack and convert) need no account.
The theme manifest
Put a sellstamp-theme.json at the root of the folder. It tells Sellstamp which engine to use and which file renders each page. Running sellstamp theme convert writes one for you.
{
"format": 1,
"name": "Northwind",
"version": "1.0.0",
"engine": "liquid",
"layout": "layout/theme.liquid",
"routes": {
"home": "templates/index.json",
"product": "templates/product.liquid"
},
"settings": {
"schema": "config/settings_schema.json",
"defaults": "config/settings_data.json"
},
"locales": "locales/",
"assets": "assets/"
}format,nameandengineare required.- Route keys:
home,products,category,search,product,cart,blog,blog_post,faq,feedback,status,terms,privacy,refundandpage. Any page you leave out uses the built-in store page, so you can start with just home and product. - For a single-page app, use
"engine": "static", "spa": true. - A settings schema becomes a settings form the merchant fills in, so expose the colours, text and images a merchant will want to change.
Let the platform handle the essentials
Some parts of every page come from the store’s settings, so a theme never has to build them and can never get them wrong:
- The page title, description, canonical link, social tags, structured data and favicon. Your own versions of these are replaced; everything else in your <head> stays.
- The
langanddirattributes on<html>. - Platform blocks. Place them where they fit your design with
platform_block:search,cart_drawer,language_switcher,currency_switcher,consent_bannerandattribution. The consent banner and attribution are always added, so give them a sensible spot.
<header class="site-header">
{% render 'logo' %}
{% platform_block 'search' %}
{% platform_block 'cart_drawer' %}
</header>For the cart and checkout, use the product form (Liquid’s {% form 'product' %}) or the theme compatibility API from your own JavaScript: GET /v1/cart to price a basket, POST /v1/checkout to start checkout, and GET /v1/search for search.
Translations and right-to-left languages
- Put every string in
locales/<language>.jsonand print it with thetfilter. Missing keys fall back to the default language. - Use logical CSS properties (
margin-inline-start, notmargin-left) so the theme works in Arabic, Hebrew, Persian and Urdu. - Never hard-code prices or currency symbols. Use the engine's money helpers, so every currency the store sells in displays correctly.
Develop with live preview
Create an API key with the themes.read and themes.write scopes under Settings → API keys, limited to your store. Then:
sellstamp theme check ./my-theme --pretty # what the import will say sellstamp theme lint ./my-theme --pretty # syntax, missing translations, accessibility sellstamp login --api-key - # paste your key sellstamp theme dev ./my-theme --shop <shopId> # live preview on your store's real data sellstamp theme push ./my-theme # upload a new draft version
theme dev serves a preview at localhost:4848 that re-renders every time you save, and prints a signed preview link that also runs your scripts. push never publishes; publishing is always done in the dashboard.
Add the checks to your CI so a broken theme never ships:
- run: sellstamp theme lint ./theme - run: sellstamp theme check ./theme --strict
Keep it safe to install
Every upload is scanned. A theme that follows these rules goes through without delay:
- Never include secrets: private keys, live API tokens or .env files. A theme with one is refused.
- Do not add password or card fields, and do not send form data to other sites. Checkout and sign-in are handled by Sellstamp; themes that collect them are held for review.
- Avoid eval, encoded scripts and postMessage without an origin check. They are flagged to the merchant.
- Load as few outside hosts as you can. The merchant approves each one, and each extra host is one more reason to say no.
- Upload built files, not source. Nothing in a theme is installed or built.
Accessibility rules every theme should pass
sellstamp theme lint and the report on the Import page check each of these:
- One h1 per page
- And headings in order, without skipping a level.
- Landmarks
- A
<main>and a<nav>on every page. - Image alt text
- Every
<img>has analt, empty for decoration. - Labelled controls
- Every input has a label, and every button has a name.
- Visible focus
- Never remove the focus outline without a replacement; style
:focus-visible. - Reduced motion
- Wrap animations in
@media (prefers-reduced-motion: no-preference). - Zoom allowed
- Do not use
user-scalable=noor a maximum scale below 2. - Contrast
- Text and background colours in your settings defaults reach at least 4.5:1.
Performance budgets
Fast themes sell more. The audit measures every page against your plan’s budget and warns you when a page goes over:
- Page weight
- 1.5 MB on Starter, 2 MB on Growth, 2.5 MB on Scale.
- JavaScript
- 300 KB, 400 KB and 500 KB per page.
- CSS
- 150 KB, 200 KB and 250 KB per page.
- Any single image
- 300 KB, 400 KB and 500 KB. Use WebP or AVIF.
- Outside hosts
- 4, 6 and 8 per page.
- Loading
- Largest content painted within 2.5 seconds, and layout shift under 0.1.
To stay well inside them: size images for where they are shown and lazy-load anything below the fold, give images a width and height so the page does not jump, load at most two font families, and defer scripts that are not needed to see the page.
Test with real store content
- A product with no image, one image and ten images.
- A very long product name, and a one-word one.
- A product on sale, out of stock, and with options.
- A store with two products, and one with two hundred.
- Each language the store sells in, including a right-to-left one if you support it.
- The home, product and cart pages at phone width, with the consent banner showing.
Publish and roll back
Editor themes: select Publish in the theme editor. Every publish is saved as a version you can restore later.
Code themes: open Storefront → Theme → Import. For each version you can see the report, every page rendered with your store’s data, a desktop and phone preview, the accessibility and performance audit, and what changed since the live version. Approve the outside hosts the theme needs, then publish. To roll back, publish an earlier version.
Sell your theme on the marketplace
Themes built in the editor can be listed on the theme marketplace, where other merchants preview them with their own products before installing.
- Publish the theme on your store. The listing is your published theme.
- Open Storefront → Theme → Marketplace and share your theme.
- Give it a name (up to 60 characters) and a tagline (up to 140) that says who it is for.
- Choose a category: gaming, luxury, minimal, digital products or streetwear.
- List it for free, or for a price between $1 and $1,000. You keep 80% of every sale.
Publishing your listing again updates it. If you remove it from the marketplace, stores that already installed it keep their copy.
The final theme checklist
- Looks finished on phone, tablet and desktop.
- Works with long and short headings, product names and descriptions.
- No empty image areas when a product has no picture.
- Price and buy button visible without scrolling on a phone.
- Text contrast at least 4.5:1, focus visible, motion respects reduced-motion.
- One h1 per page, headings in order, every image and control labelled.
- Every page inside the performance budget.
- Every string translated, and prices printed with the money helpers.
- Code themes:
theme lintclean andtheme check --strictpassing. - Tested with a real purchase in test mode, from product page to the order confirmation.
Sellstamp