This might be a few years late but when Shopify released the Dawn theme, it wasn’t just offering merchants a new storefront design — it was introducing a new standard for theme development. As the first theme built entirely for Online Store 2.0, Dawn reimagines what it means to create performant, flexible, and modular experiences on Shopify.
Whether you’re customising a storefront, building a new theme, or exploring how Shopify works under the hood, Dawn is your blueprint. In this article, we’ll break down its architecture, styling system, JavaScript structure, and customisation philosophy from a developer’s point of view — highlighting its strengths, limitations, and best practices.
The Architecture: Modular, JSON-Driven, and OS2-Ready
Dawn embraces the Online Store 2.0 model with a simplified, logical file structure:
/layout
theme.liquid
/templates
product.json
/sections
main-product.liquid
/snippets
/assets
/config
settings_schema.json
Each .json template defines which sections appear on the page and in what order. Sections contain the actual rendering logic and often reference snippets, which hold reusable components like badges, product prices, or icons.
This architecture favors modularity and merchant customisation. Merchants can rearrange content without writing code, and developers can encapsulate logic cleanly.
Pros:
- Drag-and-drop flexibility in the editor.
- Decoupled layout logic with clean separation of concerns.
- Encourages reusability via snippets and isolated sections.
Cons:
- JSON templates don’t allow Liquid logic (e.g.,
if,for). - Code can get repetitive if sections aren’t abstracted properly.
Best Practices:
- Keep templates minimal — move logic to sections and snippets.
- Reuse snippets for repeating UI patterns.
- Use Shopify Theme Check to enforce consistency and avoid bugs.
Schema and Settings: Making Themes Configurable
Every section in Dawn is paired with a JSON-based schema, typically embedded via a {% schema %} block at the bottom of the file. This schema defines settings (like text inputs, toggles, and image selectors) and blocks (repeatable components like slides or FAQs).
{
"name": "Image Banner",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading"
}
]
}
These settings empower merchants to control layout, text, imagery, and interactivity — without ever editing code.
Pros:
- Exposes deep customisation options via Shopify’s theme editor.
- Blocks let you create flexible layouts with reorderable components.
- Keeps code clean by separating configuration from markup.
Cons:
- Schema logic is static — no conditionals or dynamic rendering.
- Overly complex schemas can bloat sections and confuse editors.
Best Practices:
- Be intentional with what settings you expose — don’t overwhelm merchants.
- Group related settings and use helpful labels.
- Reuse schema patterns across sections to reduce complexity.
Styling System: Utility-First, CSS-Only, No Build Step
Dawn doesn’t use Tailwind or SCSS. Instead, it uses raw CSS, split across files like base.css, utilities.css, and components.css, with global tokens declared using CSS variables:
:root {
--color-text: #1a1a1a;
--spacing-base: 1rem;
}
The result is a minimalist, fast-loading CSS setup with full theming support and no reliance on preprocessors.
Pros:
- Fast initial load — no need for compilation.
- CSS variables allow consistent spacing, typography, and color theming.
- Easy for developers to read and override styles directly.
Cons:
- No nesting or mixins like SCSS offers.
- Can become verbose without utility frameworks.
Best Practices:
- Avoid editing
base.css—use a custom override file for theme extensions. - Stick to the token system (
--spacing-small, etc.) to maintain visual consistency. - Follow BEM-style class naming for maintainable code.
JavaScript: Lightweight, Modular, and Framework-Free
Dawn’s JavaScript is written in vanilla ES6, using custom elements and modular patterns. Each interactive component (like quantity selectors or modals) is encapsulated in its own JS file and tied to HTML using data-* attributes or custom tags.
Example:
class ProductForm extends HTMLElement {
connectedCallback() {
this.addEventListener('submit', this.onSubmit);
}
}
customElements.define('product-form', ProductForm);
This approach keeps things fast, lean, and highly readable for developers.
Pros:
- No jQuery, no frameworks — just browser-native JavaScript.
- JS is modular and tied closely to HTML behavior.
- Great performance on low-end devices and mobile networks.
Cons:
- No centralised state management or complex event system.
- No JS bundler or build step by default.
Best Practices:
- Use
data-*attributes and Web Components for encapsulated logic. - Avoid global variables or scripts that impact the entire DOM.
- If you need reactive UI, consider layering on Alpine.js or your own build setup.
Performance and Accessibility: Fast and Compliant
Dawn was designed to excel in Core Web Vitals and accessibility:
- All images use
loading="lazy". - Layouts are responsive and mobile-first.
- ARIA attributes are present on most interactive elements.
- Minimal render-blocking resources are loaded above the fold.
It sets a strong baseline for Lighthouse performance, especially on mobile.
Pros:
- Fast load times, especially on slower devices or 3G.
- Strong scores for SEO, accessibility, and UX out of the box.
- Clean HTML and semantic markup makes extension easier.
Cons:
- Some accessibility patterns are minimal or basic (e.g., skip links or custom announcements are absent).
- No built-in progressive enhancement features like offline support.
Best Practices:
- Audit your customisations with Lighthouse regularly.
- Use semantic HTML and meaningful alt text.
- Test the theme with keyboard-only navigation and screen readers.
Customization: Fork, Extend, and Iterate
Dawn is designed to be forked and extended. Because Shopify updates Dawn regularly via GitHub, you should always treat the theme as a starting point, not a static solution.
You can build new sections, modify templates, or even rebuild the entire front-end while still benefiting from Dawn’s lean structure and smart defaults.
Pros:
- Easy to get started and build upon.
- Fully compatible with Shopify CLI and Git version control.
- Encourages modular development patterns.
Cons:
- Manual effort is needed to merge upstream changes from Shopify.
- Over-customisation can make upgrades difficult.
Best Practices:
- Always work on a forked copy under source control.
- Add new sections/snippets instead of editing core ones when possible.
- Document custom schema settings and logic for future collaborators.
Final Thoughts
Shopify’s Dawn theme is more than a sleek storefront — it’s a statement about how modern themes should be built: modular, performant, accessible, and easy to extend. It balances merchant usability with developer flexibility and lays the groundwork for scalable, future-ready storefronts.
If you’re building your first Shopify store or crafting a custom theme for a client, Dawn is your best starting point — not just because it’s what Shopify recommends, but because it’s engineered for modern commerce.
Newer: A Developer’s Technical Breakdown of Shopify’s Horizon Theme
Older: ITerm 2 & ZSH script for Git Branch
First published on Medium.
