home

Free Horizon Theme

· 3min

CLOISTER is a general-purpose Shopify theme: minimal, line-ruled, and a little SaaS in feel. I designed and built it, inspired by Healf, Allbirds and other modern, minimal stores on Shopify.

It’s also fast: 99 for performance and 100 for accessibility on Lighthouse (desktop, homepage), with 14 KB of JavaScript in the whole theme.

👉 View the store (password: skeugh)

🤖 View repository on GitHub

Liquid · Theme blocks · Web components · Section Rendering API · Shopify Admin GraphQL


Speed

Lighthouse, desktop, homepage.
Lighthouse, desktop, homepage.
  • Small, and no build. 25 plain ES modules, no framework, 14 KB gzipped in total. Each section loads only its own scripts, at low priority, so they never compete with the main image.
  • The server renders, not the browser. Choosing a variant or a filter fetches the re-rendered section from Shopify instead of rebuilding it in JavaScript.
  • Fewer requests. Cart quantity clicks are batched into one request, and search waits for a pause in typing.

From Skeleton to Horizon

I started from Shopify’s Skeleton theme and rebuilt it on Horizon’s architecture: JSON templates, section groups, and theme blocks that nest, so even the buy box can be rearranged in the editor.

Nested blocks, editable in the theme editor.
Nested blocks, editable in the theme editor.

The Lines

The design hangs on thin lines: one down each side of the page, one under every section, and more between cards. In a theme where any section can be added, removed or reordered, that’s the first thing to break.

Horizon has a wrapper snippet for sections, but only its generic Section uses it. In Cloister every section renders through it, and it’s the only place section lines are drawn:

.section {
  display: grid;
  grid-template-columns:
    minmax(var(--page-margin), 1fr)
    minmax(0, var(--page-content-width))
    minmax(var(--page-margin), 1fr);
  border-block-end: 1px solid var(--color-border);   /* the line under each section */
}

.section__content {
  grid-column: 2;
  border-inline: 1px solid var(--color-border);      /* the lines down each side */
}

Every section builds the same grid from the same width setting, so the side lines join into one line down the page, and no section can set its own width or borders. Sections only describe their content, and the frame belongs to the theme. Grids of cards work the same way: each cell draws only its right and bottom line, so lines never double up.


Colour Palettes

Six palettes plus Custom. One choice sets every theme colour, and the theme detects light or dark backgrounds and adjusts form controls, scrollbars and overlays to match.


One Product Template

Everything that differs between products comes from metafields and metaobjects: size charts, features, care guides and reviews. A section with nothing to show doesn’t render, so a product with nothing filled in still looks complete.


Setting Up a Store in One Command

A theme that gets its content from metafields is half blank on an empty store. On earlier stores I’d set up metafields, products and menus by hand in the admin every time, and lost a lot of hours to it.

Most of this was new to me. I hadn’t realised Shopify CLI can run any Admin API query against a store you’re logged in to, with no app and no access token. So I wrote npm run setup:content, which fills a dev store in one go: every metafield and metaobject definition, 14 products with variants and swatches, collections, pages, menus and blog posts.

function gql(query, variables = {}) {
  const stdout = execFileSync('npx', [
    'shopify', 'store', 'execute', '-s', store, '--no-input', '-j', '--allow-mutations',
    '-q', query, '-v', JSON.stringify(variables),
  ], { encoding: 'utf8' });
  return JSON.parse(stdout);
}

It looks each item up by handle before writing, so it’s safe to run again. Two things caught me out: productSet links colour values without their swatches (a second productOptionUpdate fixes it), and products sharing an image URL share one file, alt text included.

Limitations

  • Existing products keep their variants. Once a colour option is linked, productSet won’t run on that product again, so changing prices or sizes means deleting it and re-running.
  • Definitions, collections and pages are only created, never updated.
  • Menus are replaced on every run, so it’s for dev stores only.
  • It’s slow. Every query starts a new CLI process.

Read my growth engineering notes

Start reading
Growth notes