Build a theme with AI
Describe the look you want, copy the prompt and paste it into your AI assistant (Claude, ChatGPT or similar). It will build a theme package that follows this guide. Zip the result and upload it in Online store → Themes → Upload theme.
Preview the prompt
This is not a Shopify theme
If you know Shopify themes, forget the folder structure. A package built the Shopify way is rejected or does nothing here. The platform reads only the files in Package layout.
templates/*.liquid or templates/*.json, layout/theme.liquid, sections/*.liquid (custom sections end in .flys), blocks/, locales/, config/settings_schema.json, config/settings_data.json, or Liquid for the header, footer, product page and cart. Do not use {% section %}, {% form %}, product.variants or cart.The mental model: the theme is mostly config/theme.json, a JSON file that picks colours, fonts and shapes and lists the built-in sections for the home page (see Built-in sections). Custom .flys sections are the exception, written only for a design no built-in section can do. A package with more .flys files than theme.json sections is wrong.
How themes work
A theme here is data plus a few Liquid files, not a tree of templates. You decide the look through settings, sections you write and one stylesheet. The platform owns the header, footer and product markup.
| Piece | Where it lives | Can a theme change it? |
|---|---|---|
| Global look: colours, fonts, shape, cards, header style, spacing, motion | config/theme.json → settings | Yes. Every key becomes a customizer control. |
| Header and footer | config/theme.json → header, footer | Settings only. Their markup is a platform component. |
| Home page | config/theme.json → sections | Yes, an ordered list of sections. |
| Product, collection, page, blog, article layouts | config/theme.json → templates | Settings plus extra sections around the built-in __main block. |
| Custom sections | sections/<handle>.flys | Yes. This is where a theme gets its own design. |
| Shared Liquid | snippets/<handle>.flys | Yes. |
| Extra CSS / JS | assets/custom.css, assets/custom.js | Yes. |
Extra <head> tags, markup before </body> | layout/head.html, layout/body-end.html | Yes. |
Four consequences shape every decision:
- A theme's identity comes from its
settingsvalues, the custom sections it ships andassets/custom.css. - Built-in section types already exist (hero, slideshow, products, category-tiles, marquee, image-text, rich-text, faq, testimonials, gallery, newsletter, trust, highlight, chat-promo, spotlight, statement, feature-banner, blog-posts, banner). Prefer them and write a custom section only when none can do the job.
- Everything a merchant might change must be a setting. If it is hard-coded in Liquid or CSS, the customizer cannot reach it and the theme is not editable.
- Sections render on the server (Liquid to HTML). Section JavaScript runs in the browser afterwards.
Package layout
The package mirrors the files the code editor manages, plus a manifest and an optional demo layer. Nothing else belongs in it.
my-theme/
theme.manifest.json name, version, description, category, bestFor, swatch
config/
theme.json the clean theme: structure and settings, no dummy content
sections/
<handle>.flys custom sections (max 30)
snippets/
<handle>.flys shared Liquid (max 40)
assets/
custom.css styling beyond settings
custom.js optional
layout/
head.html optional
body-end.html optional
demo/ used only when the merchant ticks "Add dummy data"
content.json overlay of text + media tokens
media/ images, video, posters
README.md what the theme is and what each section does
Handles in sections/ and snippets/ use lowercase letters, numbers and hyphens (max 40 characters) and end in .flys. Files ending in .liquid are accepted and renamed.
Hard limits
| Limit | Value |
|---|---|
| The uploaded .zip | 28 MB |
| Size of any one code file | 200 KB |
| Custom sections / snippets in a store | 30 / 40 |
| Settings per section or block | 40 |
| Block types per section | 12 |
| Blocks per section instance | 1 to 30 (max_blocks, default 16) |
| Home-page sections | 30 |
| Sections per page template | 12 |
| Alternate templates per type | 8 (product, collection, page) |
| Demo media in total | 15 MB |
theme.manifest.json
{
"name": "Ember",
"version": "1.0.0",
"description": "A warm, confident storefront in charcoal and ember orange.",
"category": "Lifestyle",
"bestFor": "Home goods, candles, gifts, small-batch brands",
"swatch": ["#f6f1ea", "#1f1b18", "#e2561b"]
}
name is required (at least 2 characters). It is what the merchant sees in their theme list. swatch is up to three colours used for the theme's preview chip.
config/theme.json
The theme's structure: { settings, header, footer, templates, sections }. Invalid values are silently replaced by their defaults and unknown section types are dropped, so always run the check script (see Build and check).
settings (global)
Unknown keys are discarded. Colours are 6-digit hex only.
| Key | Values |
|---|---|
bg text accent onAccent surface inverseBg inverseText | #rrggbb |
headingFont bodyFont | one of the supported fonts (below) |
headingCase buttonCase | uppercase | none |
headingWeight | 400 500 600 700 800, a weight the chosen font has |
headingTracking | tight | normal | wide |
headingScale | s | m | l |
headingStyle | plain | rule | bar | lined |
headingAlign | left | center |
radius | 0 to 28, step 2 (px) |
buttonShape / buttonStyle | square rounded pill / solid outline soft |
container | 1100 | 1280 | 1440 |
cardStyle | plain bordered elevated centered overlay underline brutal tinted boutique panel |
cardHover | zoom | swap | reveal |
headerStyle | surface | inverse | blend | glass |
spacing | compact | normal | airy |
lineWeight | thin | regular | heavy |
texture | none grain grid dots |
announceStyle | rotate | ticker |
mobileBar logoMark | true | false |
motion | none | subtle | expressive |
text on bg, onAccent on accent, inverseText on inverseBg and text on surface, each at least 4.5:1.header and footer
header.layout:leftcenterstackedpill.header.logoImageis an image path andheader.menuis a menu handle (defaultmain-menu).footer.layout:columnscenteredbigbrandminimalnewsletterboutique. Theboutiquelayout adds address, phone, WhatsApp, email and two link lists.- Both take a
schemeofdefault,surface,inverseoraccent(footer defaults toinverse). - Footer links point at pages by path (
/pages/about-us). A new store may not have those pages, so prefer routes that always exist:/collections/all,/collections,/cart,/track.
sections (home page)
{ "id": "hero-main", "type": "slideshow", "enabled": true, "settings": { } }
idmatches^[\w-]{1,60}$and is unique. Always write explicit, stable ids, because the dummy-data layer targets sections by id.typeis a built-in type orcustom:<handle>.- Omit a setting to get its default. Leave images as
""so a store without dummy data shows each section's empty state. - List settings such as
blocksare arrays of{ "type": "heading", "text": "…" }objects.
Fonts
Anton, Bebas Neue, Archivo Black, DM Serif Display, Oswald, Space Grotesk, Lora, Inter, Manrope, Poppins, DM Sans, Playfair Display, Cormorant Garamond, Fraunces, Instrument Serif, Libre Baskerville, Abril Fatface, Outfit, Plus Jakarta Sans, Sora, Unbounded, Bricolage Grotesque, Syne, Josefin Sans, Rubik, Work Sans, Nunito, Quicksand, Archivo, Barlow Condensed, Chakra Petch, Righteous, Newsreader, Bodoni Moda, Jost, Fredoka, Space Mono, Young Serif, Epilogue, Hanken Grotesk, Instrument Sans, Tenor Sans. A font with only a 400 weight needs headingWeight: "400".
layout/head.html and forcing it in CSS breaks the merchant's font controls in the customizer.templates
Keys: product, collection, collections, page, blog, article, cart. Each is a list of { id, name?, settings, sections }. The first must have id: "default", and sections must contain { "type": "__main" }, the platform's own block. You may add other sections, including custom ones, before or after it.
Custom sections
One sections/<handle>.flys file holds markup, an optional {% stylesheet %}, an optional {% javascript %} and one required {% schema %}.
<section class="sec pad promo-band promo-band--{{ section.settings.align }}">
<div class="wrap">
{% if section.settings.heading != blank %}
<h2 class="promo-band__title">{{ section.settings.heading }}</h2>
{% endif %}
{% for block in section.blocks %}
<p class="promo-band__item" id="{{ block.id }}">{{ block.settings.text }}</p>
{% endfor %}
</div>
</section>
{% stylesheet %}
.promo-band { background: var(--bg); color: var(--text); }
.promo-band--center { text-align: center; }
{% endstylesheet %}
{% schema %}
{
"name": "Promo band",
"settings": [
{ "type": "text", "id": "heading", "label": "Heading", "default": "A heading" },
{ "type": "select", "id": "align", "label": "Alignment",
"options": [{ "value": "left", "label": "Left" }, { "value": "center", "label": "Centre" }],
"default": "left" }
],
"blocks": [
{ "type": "item", "name": "Item", "settings": [{ "type": "text", "id": "text", "label": "Text", "default": "Item" }] }
],
"max_blocks": 8,
"presets": [{ "name": "Promo band", "blocks": [{ "type": "item" }, { "type": "item" }] }]
}
{% endschema %}
Schema setting types
These are the only types that exist: text, textarea, richtext (plain text), number (arrives as a string), checkbox, select and radio (need options), range (needs numeric min and max; optional step, unit), color (6-digit hex default), image_picker, url, collection (a handle), link_list (a menu handle), plus header and paragraph for labels in the panel.
A setting id matches ^[a-zA-Z_][a-zA-Z0-9_]{0,39}$ and is unique within its section. blocks is reserved. Use info for help text. presets[0] sets the starting settings and blocks of a new instance.
video setting type yet. Use a url setting for an uploaded /uploads/….mp4 or .webm address plus an image_picker for the poster, render <video muted playsinline loop autoplay poster="…"> only when the url is not blank, and always fall back to the poster.Rendering rules
- The wrapper
<div class="fw-section fw-section-<handle>" data-sec="<id>">is added for you. Do not add your ownid. {% stylesheet %}is global, not scoped, and loads once per section type. Prefix every class with your section's name (.promo-band__title).{% javascript %}runs once per section type, not per instance. Select instances withdocument.querySelectorAll('.fw-section-<handle>'), make it idempotent (guard with adata-readyattribute) and prefer event delegation. The customizer re-renders a section whenever a setting changes.- A broken section shows a red error box instead of breaking the page. Treat any error box as a bug.
What Liquid can see
section.settings.*, section.blocks (each {id, type, settings}), section.blocks_size, section.id, and:
| Object | Contents |
|---|---|
shop | name url email phone currency currency_code products_count instagram |
settings | the theme's global settings (settings.accent, settings.headingFont…) |
collections | keyed by handle, plus collections.all: title handle description image url products products_count |
products / all_products | keyed by handle: id title handle url type category vendor tag sku description price compare_at_price on_sale available featured_image images sizes colors |
linklists / menus | keyed by handle; each has links with title url links |
pages | keyed by handle: title handle url content |
routes | root_url collections_url all_products_collection_url cart_url track_url |
Prices are cents: print them with {{ product.price | money }}. Filters added by the platform: money, money_without_currency, money_with_currency, img_url, image_url (both return the address and take no size argument), escape, escape_once, img_tag, handleize, handle, pluralize. Standard Liquid filters also work.
There is no product.variants, cart or request object, and no {% section %} or {% form %} tag. All values are HTML-escaped before they reach the template, so a setting can never inject HTML. Links starting javascript:, vbscript: or data: are blanked.
Design tokens and helper classes
Use tokens instead of literal values so customizer changes flow through everything.
- Colour tokens, set by the colour scheme of the current section (
sc-default,sc-surface,sc-inverse,sc-accent):--bg --text --accent --on-accent --surface --line --muted - Global tokens:
--c-bg --c-text --c-accent --c-on-accent --c-surface --c-inv-bg --c-inv-text,--font-h --font-b,--r(corner radius),--btn-r,--container,--h-case --h-weight --h-track,--bw(line weight),--section(vertical rhythm),--gutter,--gap-x --gap-y - Helper classes:
wrap(centred container),sec,pad,eyebrow,btnwithbtn-dark,btn-accent,btn-light,btn-ghost,btn-block. There is nobtn-outlineand no.container. Define anything else in your own prefixed CSS.
Add a Colour scheme select to every custom section (options default, surface, inverse, accent) and output class="sc-{{ section.settings.scheme }}" on the outer element, so it follows the same scheme system as built-in sections.
Design mobile first with breakpoints near 760px and 1000px. Every section must work at 375px with no horizontal scroll.
The editability rules
A theme is robust only if all twelve rules hold. Review every section against them.
- No hard-coded copy. Every visible string is a setting, a block or store data (
shop.name). No literal brand names. - No hard-coded colours, fonts or radii in section CSS. Use the tokens. A literal colour is fine only for neutral overlays (
#000at a variable opacity). - Every layout variation is a setting (alignment, columns, ratio, image side, density), not baked in.
- Repeating content uses blocks, so merchants can add, remove and reorder it. Never hard-code three cards.
- Every setting has a default and a label. A section added from "Add section" must look finished from its defaults and preset.
- Empty states are designed. With every image empty and every optional text empty, the section renders cleanly. Guard optional output with
!= blank. - Settings stay within limits. Respect
maxlengthand design for the longest allowed text. - Merchant-safe markup. Semantic HTML, at most one
<h1>per page,alttext,loading="lazy"below the fold, visible focus states andprefers-reduced-motionrespected. - Prefer built-in sections. Twelve built-in sections plus two well-made custom ones beat twelve custom ones.
theme.jsonstays valid in the customizer: every value passes sanitising unchanged (the check script proves it).assets/custom.cssis a last resort. It may restyle header, footer and cards and add polish, but it uses tokens, never hides a customizer-controlled element and is commented to say which setting each rule respects.- Reset-safe. "Reset to defaults" rebuilds the theme from the package. It must look intact afterwards.
Dummy data
When a package has a demo/ folder, the upload dialog shows an Add dummy data checkbox. Dummy data is text, images and videos only. Products, collections, pages and menus are never part of it.
config/theme.json is always the clean structure. demo/content.json is a patch applied on top. Unticked, the merchant gets a theme ready to fill. Ticked, the same theme comes populated.
{
"settings": {},
"header": { "logoImage": "@demo/logo.svg" },
"footer": { "tagline": "Gear for every journey." },
"sections": {
"hero-main": {
"slides": [
{ "image": "@demo/hero-1.jpg", "title": "Go further", "text": "Built for the long run.",
"buttonText": "Shop now", "link": "/collections/all" }
]
},
"story-video": { "video": "@demo/story.mp4", "poster": "@demo/story.jpg", "heading": "How it is made" }
},
"templates": {}
}
Merge rules
sectionsmaps a section id to a settings patch, shallow-merged into that section. A list value (slides,items,blocks…) replaces the whole list. Unknown ids are ignored.header,footerandsettingsare shallow-merged into the matching objects oftheme.json.templatesmirrorstheme.json:{ "product": { "default": { "settings": {}, "sections": { "<id>": {} } } } }.- Media tokens. A string starting
@demo/refers todemo/media/<name>. On install each referenced file is added to the store's Files library and the token is replaced with its real address. - Only referenced files are uploaded. Never ship unused media.
- The demo layer never touches
layout/,assets/,sections/orsnippets/, and it may not add or remove sections. - If the box is unticked,
demo/is ignored completely and nothing is uploaded.
What to put in it
- Every section that shows media or marketing copy gets demo content: hero, image-text, gallery, category tiles, testimonials, FAQ, feature banners, marquee words, newsletter text and the header logo.
- Write brand-neutral, believable copy in the theme's language. No lorem ipsum, no real brand names, no claims a store could be liable for (prices, awards, certifications, medical or legal claims).
- Testimonials are clearly generic ("Alex M."). Never fabricate endorsements from real people.
Media rules
| Type | Format | Budget |
|---|---|---|
| Photos | .jpg or .webp (SVG only for flat graphics and logos) | Up to 1600px wide (2400 for a full-bleed hero), under 300 KB each |
| Phone variants | portrait, about 900×1200 | Under 200 KB |
| Video | .mp4 (H.264, no audio) or .webm | Under 8 MB each, at most 2 videos, 1280×720, a 10 to 20 second loop |
| Poster for each video | .jpg | Under 150 KB |
All of demo/media/ | Under 15 MB |
Allowed types are png, jpg/jpeg, webp, gif, svg, mp4 and webm. Images must be licensed for redistribution inside a theme: original art, generated art, or CC0 / Unsplash-licence photos with credits in demo/CREDITS.md. Never scrape a brand's images. Uploaded SVGs are sanitised (scripts, foreignObject and event handlers are stripped), so keep them plain. Do not reference platform art under /img/…: ship your own copies.
Built-in sections
Use these type values in config/theme.json → sections, with only the listed settings keys. one of a|b means exactly one of those strings. Image values are "" in the clean theme. list of {…} is an array of objects with those keys. blocks is an array of { "type": "heading", "text": "…" } objects. Unknown keys are dropped.
| Type | Settings |
|---|---|
heroHero | layout one of strip|full|split|center|editorial|collage|framed|type|marqueeeyebrow texttitle texttitleSize one of s|m|lsubtitle textareactaText textctaLink textctaText2 textctaLink2 textimage1 imageimage2 imageimage3 imagemobileImage imageheight one of s|m|l|screenmobileHeight one of auto|s|limageFit one of cover|containfocal one of auto|top|center|bottom|left|rightcontentAlign one of left|center|rightcontentV one of bottom|middle|topoverlay number 0-80showSticker true|falsestickerText textscheme one of default|surface|inverse|accent |
trustHighlights bar | style one of plain|iconsitems list of {icon: one of none|truck|ret|cash|card|shield|box|check|lock|phone|pin|tag|spark|fabric|clock|gift|star|hearttitle texttext text}scheme one of default|surface|inverse|accent |
bannerPromo banner | contained true|falseheight one of s|m|limageFit one of cover|containfocal one of auto|top|center|bottom|left|rightscheme one of default|surface|inverse|accent |
productsProduct grid | eyebrow textsubheading textareaheading textcollection collectioncategory textlimit number 0-48layout one of grid|carouselcolumns one of 2|3|4|5|6mobileColumns one of 1|2ratio one of 3/4|4/5|1/1|4/3imageFit one of cover|containfocal one of auto|top|center|bottom|left|rightimagePad number 0-24imageBg one of soft|white|nonegap one of tight|normal|roomytextSize one of s|m|lshowCategory true|falseshowViewAll true|falseviewAllPlacement one of top|bottomviewAllText textshowFilters true|falseshowSearch true|falseshowTags true|falsescheme one of default|surface|inverse|accent |
category-tilesCategory tiles | eyebrow textsubheading textareaheading textsource one of auto|picklimit number 2-24picks list of {collection: collectiontitle textimage image}style one of overlay|below|circle|card|pilllayout one of grid|carouselcolumns one of 2|3|4|5|6|8mobileColumns one of 1|2|3ratio one of 4/5|1/1|4/3|16/9imageFit one of cover|containfocal one of auto|top|center|bottom|left|rightoverlay number 0-80showCount true|falseshowDesc true|falsetileCta textshowAll true|falsescheme one of default|surface|inverse|accent |
marqueeScrolling text | words list of {text: text}separator textspeed number 10-80size one of m|xllook one of solid|outline|mixedscheme one of default|surface|inverse|accent |
image-textImage with text | blocks blocks, types: eyebrow, heading, text, point, callout, buttonimage imageimagePosition one of left|rightimageSize one of s|m|lratio one of 4/5|1/1|4/3|16/9|autoimageFit one of cover|containfocal one of auto|top|center|bottom|left|rightimagePad number 0-24scheme one of default|surface|inverse|accent |
rich-textText block | blocks blocks, types: eyebrow, heading, text, buttonalign one of center|leftframe one of none|borderscheme one of default|surface|inverse|accent |
faqFAQ | eyebrow textheading textstyle one of lines|cardsalign one of left|centeritems list of {q: texta textarea}buttonText textbuttonLink textscheme one of default|surface|inverse|accent |
blog-postsBlog posts | eyebrow textsubheading textareaheading textblog textlimit number 1-12columns one of 2|3|4showImage true|falseratio one of 3/2|1/1|4/5|16/9imageFit one of cover|containfocal one of auto|top|center|bottom|left|rightshowExcerpt true|falseshowDate true|falseviewAll textscheme one of default|surface|inverse|accent |
testimonialsCustomer reviews | eyebrow textsubheading textareaheading textitems list of {quote: textareaname text}scheme one of default|surface|inverse|accent |
slideshowSlideshow | slides list of {image: imagemobileImage imagelink texttitle texttext textbuttonText text}height one of auto|s|m|limageFit one of cover|containfocal one of auto|top|center|bottom|left|rightoverlay number 0-70textAlign one of left|centerautoplay true|falseinterval number 3-12showArrows true|falseshowDots true|falseinset true|falsescheme one of default|surface|inverse|accent |
highlightText with list | layout one of columns|headingblocks blocks, types: eyebrow, heading, text, chips, button, note, listborder one of none|lines|accentscheme one of default|surface|inverse|accent |
chat-promoChat prompt | blocks blocks, types: eyebrow, heading, text, button, note, messageshopName textflip true|falsescheme one of default|surface|inverse|accent |
spotlightSpotlight with floating photos | heading texttext textareabadgeText textbadgeLink textbuttonText textbuttonLink textimages list of {image: imagelink text}drift true|falsescheme one of default|surface|inverse|accent |
statementScroll-reveal statement | heading textareatext textareabuttonText textbuttonLink textsize one of m|lalign one of center|leftreveal true|falsescheme one of default|surface|inverse|accent |
feature-bannerPhoto with features | eyebrow textsubheading textareaheading textimage imagemobileImage imageratio one of 16/9|21/9|4/3focal one of auto|top|center|bottom|left|rightlayout one of overlay|belowitems list of {icon: one of none|truck|ret|cash|card|shield|box|check|lock|phone|pin|tag|spark|fabric|clock|gift|star|hearttitle texttext text}buttonText textbuttonLink textscheme one of default|surface|inverse|accent |
galleryPhoto gallery | eyebrow textsubheading textareaheading textbuttonText textbuttonLink textimages list of {image: imagelink textalt text}columns one of 2|3|4|5|6mobileColumns one of 1|2|3ratio one of 4/5|1/1|3/4|4/3gap one of tight|normal|roomyscheme one of default|surface|inverse|accent |
newsletterEmail sign-up | layout one of split|centerheading texttext textareaplaceholder textbutton textextraText textextraLink textborder one of none|linesscheme one of default|surface|inverse|accent |
Block types: eyebrow {text}, heading {text}, text {text}, point {title, text}, callout {text}, button {text, link, style: primary|outline}, note {text}, chips {label, items}, list {items} (one per line), message {from: them|us, text}. The accepted block types per section are on its row above.
Icons for trust and feature-banner: none truck ret cash card shield box check lock phone pin tag spark fabric clock gift star heart.
A complete minimal package
This whole package passes the checker. Copy its shape: five files, one custom section. The zip holds these files at its top level, with no wrapping folder. The custom:harbor-band type in theme.json matches the file sections/harbor-band.flys.
theme.manifest.json
{ "name": "Harbor", "version": "1.0.0", "description": "A calm coastal storefront in navy and sand.", "category": "Lifestyle", "bestFor": "Home goods, gifts", "swatch": ["#f7f3ec", "#14213d", "#d98c3f"] }
config/theme.json
{
"settings": {
"bg": "#f7f3ec", "text": "#14213d", "accent": "#d98c3f", "onAccent": "#14213d", "surface": "#ffffff",
"inverseBg": "#14213d", "inverseText": "#f7f3ec",
"headingFont": "Fraunces", "bodyFont": "Inter", "headingWeight": "600", "headingCase": "none",
"radius": 12, "buttonShape": "rounded", "cardStyle": "plain", "headerStyle": "surface", "spacing": "airy"
},
"header": { "layout": "center", "menu": "main-menu" },
"footer": { "layout": "columns", "scheme": "inverse", "menu": "footer" },
"sections": [
{ "id": "hero-main", "type": "slideshow", "settings": { "slides": [], "height": "l", "textAlign": "left" } },
{ "id": "perks", "type": "trust", "settings": { "style": "icons", "scheme": "surface", "items": [{ "icon": "truck", "title": "Fast delivery", "text": "" }] } },
{ "id": "featured", "type": "products", "settings": { "heading": "Featured", "limit": 8, "columns": "4" } },
{ "id": "band", "type": "custom:harbor-band", "settings": { "scheme": "inverse", "heading": "" } },
{ "id": "questions", "type": "faq", "settings": { "heading": "Questions, answered", "items": [] } }
],
"templates": {
"product": [{ "id": "default", "settings": {}, "sections": [{ "type": "__main" }] }],
"collection": [{ "id": "default", "settings": { "columns": 4 }, "sections": [{ "type": "__main" }] }]
}
}
sections/harbor-band.flys
{% if section.settings.heading != blank %}
<section class="sec pad harbor-band sc-{{ section.settings.scheme }}">
<div class="wrap"><h2 class="harbor-band__title">{{ section.settings.heading }}</h2></div>
</section>
{% endif %}
{% stylesheet %}
.harbor-band { background: var(--bg); color: var(--text); text-align: center; }
{% endstylesheet %}
{% schema %}
{
"name": "Harbor band",
"settings": [
{ "type": "text", "id": "heading", "label": "Heading", "default": "A short promise" },
{ "type": "select", "id": "scheme", "label": "Colour scheme", "default": "default",
"options": [{ "value": "default", "label": "Default" }, { "value": "surface", "label": "Surface" }, { "value": "inverse", "label": "Inverse" }, { "value": "accent", "label": "Accent" }] }
],
"presets": [{ "name": "Harbor band" }]
}
{% endschema %}
assets/custom.css
/* Respects settings.accent and settings.radius via tokens */
.btn-accent { box-shadow: 0 1px 0 rgba(0,0,0,.15); }
demo/content.json
{ "settings": {}, "header": {}, "footer": { "tagline": "Made for slower days." },
"sections": { "band": { "heading": "Made to last, shipped with care." },
"questions": { "items": [{ "q": "How long is delivery?", "a": "Usually three to five working days." }] } },
"templates": {} }
Build and check
Work in this order:
- Write the brief in
README.md: audience, category, mood, palette with contrast ratios, type pairing, and what makes the theme different from the existing presets. - Decide the section list (8 to 14 home sections). Name the built-in type for each, or justify a custom section.
- Write
config/theme.jsonwith explicit ids and no demo content. - Write each custom section one at a time, starting from the closest starter in the code editor. Check it against the twelve rules after each one.
- Write
assets/custom.csslast, only for what settings cannot do. - Write
demo/content.jsonand add media. - Fill the README: section table, setting reference, how to extend.
- Run the acceptance checklist.
Put the package in themes/<handle>/ and run the checker. It runs the same code the upload runs, so what it accepts is what the platform accepts.
node scripts/build-theme-zip.js themes/<handle> --check # checks only
node scripts/build-theme-zip.js themes/<handle> # checks, then writes themes/dist/<handle>.zip
It proves the layout and file names, size limits, Liquid syntax and schemas, custom.js syntax, that every section and setting survives sanitising (with and without the demo layer), that every @demo/ token has a real file, and the media types and budget. It does not prove a section looks right: upload the zip to a test store, open the customizer and check each custom section at desktop and 375px, once with demo content and once with every optional field empty.
See Upload a theme for what happens next.
Mistakes to avoid
- Cloning an existing preset with a new colour.
- Unprefixed CSS (
.card,.title) in a section stylesheet. It leaks to the whole site. - Using
btn-outline,.container,image_url: 'width',product.variants,{% section %}or{% form %}. None exist here. - Treating
numbersettings as numbers. They arrive as strings:{{ section.settings.count | plus: 0 }}. - Section JavaScript that assumes a single instance or a single run.
- Font names outside the supported list, or a
headingWeightthe font does not have. - Demo content that links to
/img/…platform art,/pages/…pages a new store lacks, or someone else's CDN. - Demo copy that fakes real customers, press quotes, prices or certifications.
- Video that autoplays with sound, has no poster, or is over 8 MB.
- Leaving
theme.jsonwith example text that only suits one niche. Clean means neutral.
Acceptance checklist
The theme is done only when every line is true.
- The check command prints
OKwith no failures. - No unused or missing demo media, and
demo/mediais under 15 MB. - All twelve editability rules hold for every custom section.
- Each custom section renders correctly with its preset defaults, with demo content, and with every optional field empty.
- At 375px, 768px and 1440px: no horizontal scroll, no overlap, tap targets of at least 44px.
- Contrast is at least 4.5:1 for body text and 3:1 for large text, in the default,
inverseandaccentschemes. - Changing each global setting in the customizer changes the theme and breaks nothing.
- "Reset to defaults" returns an intact theme.
- The README lists the concept, section table, every custom section's settings and blocks, the demo inventory, credits and known limits.
Known limits
- No
videosetting type: use aurlsetting plus a poster image. - Uploaded themes have no signature controls (
sig*settings are stored but have no controls) and cannot be used in A/B theme tests. - An uploaded theme cannot be exported back to a .zip.
- Dummy data is chosen at upload time. To change the choice, delete the draft and upload again.