What is Shopify Schema? A Beginner's Guide with Examples


In a Shopify theme, a schema is a block of JSON (inside Liquid files) that defines settings, blocks, presets, and how they appear in the theme editor. It allows store admins to customize content without editing code.
You write the schema inside {% schema %} ... {% endschema %} tags in .liquid files (like inside sections/).
{% schema %}
{
  "name": "Banner",
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "Heading Text",
      "default": "Welcome to our store"
    },
    {
      "type": "image_picker",
      "id": "banner_image",
      "label": "Banner Image"
    }
  ],
  "presets": [
    {
      "name": "Default Banner",
      "category": "Custom"
    }
  ]
}
{% endschema %}| Part | Meaning | 
|---|---|
| "name" | The labelshown in the theme editor sidebar. | 
| "settings" | An arrayofinputs(text,image,checkbox, etc.) users can fill in. | 
| id | The key you reference inside .liquidfile, likesection.settings.heading | 
| "presets" | Default configuration when the sectionis added from theme editor. | 
type values inside settings| Type | Purpose | 
|---|---|
| "text" | Single-line input | 
| "textarea" | Multi-line input | 
| "checkbox" | Toggle true/false | 
| "image_picker" | Upload/select an image | 
| "color" | Color picker | 
| "url" | URL link input | 
| "select" | Dropdown list | 
You can add blocks if you want multiple repeated items (like features, FAQs, testimonials):
{% schema %}
{
  "name": "FAQs",
  "settings": [],
  "blocks": [
    {
      "type": "faq",
      "name": "FAQ item",
      "settings": [
        {
          "type": "text",
          "id": "question",
          "label": "Question"
        },
        {
          "type": "textarea",
          "id": "answer",
          "label": "Answer"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "FAQ Section"
    }
  ]
}
{% endschema %}{% for block in section.blocks %}
  <h3>{{ block.settings.question }}</h3>
  <p>{{ block.settings.answer }}</p>
{% endfor %}sections/ (like hero.liquid, testimonial.liquid) templates/ like product.json, index.json (for layout structure) | Concept | Description | 
|---|---|
| settings | Custom fields for the section | 
| blocks | Repeatable sets of fields | 
| presets | Default setup shown in theme editor | 
| Used in... | .liquidfiles in/sections/or/templates/ |