LiquidWorked Examples

Worked Examples

Complete sections that would pass theme review as they are. Each uses the patterns from this guide: a schema with groups, theme-token defaults, scoped CSS, guarded data and escaped attributes. Run them, change them, and take them into the editor.

Stats band

Numbered settings read with composed keys, a theme-token colour default, and a value that hides itself when cleared.

Stats bandliquid
{% schema %}
{
"name": "Stats band",
"settings": [
{ "type": "header", "content": "Style" },
{ "id": "accent", "type": "color", "label": "Number colour", "default": "@color.accent" },
{ "type": "header", "content": "Numbers" },
{ "id": "stat_1_value", "type": "text", "label": "Stat 1 value", "default": "12k+" },
{ "id": "stat_1_label", "type": "text", "label": "Stat 1 label", "default": "Orders" },
{ "id": "stat_2_value", "type": "text", "label": "Stat 2 value", "default": "4.9" },
{ "id": "stat_2_label", "type": "text", "label": "Stat 2 label", "default": "Rating" },
{ "id": "stat_3_value", "type": "text", "label": "Stat 3 value", "default": "48h" },
{ "id": "stat_3_label", "type": "text", "label": "Stat 3 label", "default": "Dispatch" }
]
}
{% endschema %}
{%- assign uid = section.id -%}
{%- assign s = section.settings -%}
<style>
.st-{{ uid }} { padding: var(--section-spacing) var(--gutter); font-family: var(--font-body); color: var(--color-text); }
.st-{{ uid }}-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--gutter);
max-width: var(--layout-max-width); margin: 0 auto; text-align: center; }
.st-{{ uid }}-v { font-family: var(--font-heading); font-size: 44px; font-weight: 800; color: {{ s.accent }}; }
.st-{{ uid }} p { margin: 4px 0 0; color: var(--color-text-muted); }
</style>
<section class="st-{{ uid }}">
<div class="st-{{ uid }}-row">
{%- for i in (1..3) -%}
{%- assign k_value = 'stat_' | append: i | append: '_value' -%}
{%- assign k_label = 'stat_' | append: i | append: '_label' -%}
{%- assign value = s[k_value] -%}
{%- if value != blank -%}
<div>
<div class="st-{{ uid }}-v">{{ value }}</div>
<p>{{ s[k_label] }}</p>
</div>
{%- endif -%}
{%- endfor -%}
</div>
</section>

Hero banner

An eager, high-priority hero image through image_tag, a placeholder when the image is cleared, and a darkening overlay from a range setting.

Hero bannerliquid
{% schema %}
{
"name": "Hero banner",
"settings": [
{ "id": "image", "type": "image", "label": "Image",
"default": "https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=1600" },
{ "id": "eyebrow", "type": "text", "label": "Eyebrow", "default": "Autumn edit" },
{ "id": "heading", "type": "text", "label": "Heading", "default": "Made slowly, worn for years" },
{ "id": "cta_label", "type": "text", "label": "Button", "default": "Shop the edit" },
{ "id": "cta_link", "type": "url", "label": "Button link", "default": "/collections" },
{ "id": "align", "type": "select", "label": "Text position", "default": "start",
"options": [{ "value": "start", "label": "Left" }, { "value": "center", "label": "Centre" }] },
{ "id": "overlay", "type": "range", "label": "Darken image (%)", "default": 35, "min": 0, "max": 80, "step": 5 }
]
}
{% endschema %}
{%- assign uid = section.id -%}
{%- assign s = section.settings -%}
<style>
.hr-{{ uid }} { position: relative; min-height: 420px; display: grid; align-items: end; overflow: hidden;
justify-items: {{ s.align }}; text-align: {% if s.align == 'center' %}center{% else %}left{% endif %}; }
.hr-{{ uid }} img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hr-{{ uid }}::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, {{ s.overlay | divided_by: 100.0 }}); }
.hr-{{ uid }}-body { position: relative; z-index: 1; padding: 48px var(--gutter); color: #fff; max-width: 640px; font-family: var(--font-body); }
.hr-{{ uid }} h1 { font-family: var(--font-heading); font-size: clamp(32px, 5vw, 56px); line-height: 1.05; margin: 8px 0 20px; }
.hr-{{ uid }} a { display: inline-block; padding: 14px 24px; text-decoration: none; background: var(--color-primary);
color: var(--color-on-primary); border-radius: var(--button-radius); font-weight: var(--button-weight); }
</style>
<section class="hr-{{ uid }}">
{%- if s.image != blank -%}
{{ s.image | image_url: 1600 | image_tag: alt: '', loading: 'eager', fetchpriority: 'high' }}
{%- else -%}
{{ 'image' | placeholder_svg_tag }}
{%- endif -%}
<div class="hr-{{ uid }}-body">
{%- if s.eyebrow != blank %}<small style="letter-spacing: .12em; text-transform: uppercase;">{{ s.eyebrow }}</small>{% endif -%}
<h1>{{ s.heading }}</h1>
{%- if s.cta_label != blank %}<a href="{{ s.cta_link }}">{{ s.cta_label }}</a>{% endif -%}
</div>
</section>

Testimonials

A list setting the merchant adds to, with a star rating per item and an empty state that removes the whole section.

Testimonialsliquid
{% schema %}
{
"name": "Testimonials",
"settings": [
{ "id": "heading", "type": "text", "label": "Heading", "default": "Kind words" },
{ "id": "quotes", "type": "list", "label": "Quotes", "item_label": "Quote", "max": 9,
"fields": [
{ "id": "text", "type": "textarea", "label": "Quote" },
{ "id": "name", "type": "text", "label": "Name" },
{ "id": "rating", "type": "range", "label": "Stars", "min": 1, "max": 5, "step": 1, "default": 5 }
],
"default": [
{ "text": "The linen softened beautifully after one wash.", "name": "Anisha, Lalitpur", "rating": 5 },
{ "text": "Arrived in a day, wrapped like a present.", "name": "Rohan, Pokhara", "rating": 5 },
{ "text": "Runs a little large, so I sized down.", "name": "Mira, Kathmandu", "rating": 4 }
] }
]
}
{% endschema %}
{%- assign uid = section.id -%}
<style>
.ts-{{ uid }} { padding: var(--section-spacing) var(--gutter); font-family: var(--font-body); color: var(--color-text); background: var(--color-surface); }
.ts-{{ uid }} h2 { font-family: var(--font-heading); text-align: center; margin: 0 0 24px; }
.ts-{{ uid }}-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gutter); max-width: var(--layout-max-width); margin: 0 auto; }
.ts-{{ uid }} figure { margin: 0; padding: 20px; background: var(--color-background); border: 1px solid var(--color-border); border-radius: var(--radius); }
.ts-{{ uid }} .stars { color: var(--color-accent); letter-spacing: 2px; }
.ts-{{ uid }} figcaption { margin-top: 12px; color: var(--color-text-muted); font-size: 14px; }
</style>
{%- if section.settings.quotes.size > 0 -%}
<section class="ts-{{ uid }}">
<h2>{{ section.settings.heading }}</h2>
<div class="ts-{{ uid }}-grid">
{%- for q in section.settings.quotes -%}
<figure>
<div class="stars" aria-label="{{ q.rating }} out of 5 stars">
{%- for n in (1..5) -%}{% if n <= q.rating %}★{% else %}☆{% endif %}{%- endfor -%}
</div>
<blockquote style="margin: 8px 0 0;">“{{ q.text }}”</blockquote>
<figcaption>{{ q.name }}</figcaption>
</figure>
{%- endfor -%}
</div>
</section>
{%- endif -%}

Image with text

One product from product_source, a layout switch from a checkbox, and an add-to-cart widget.

Image with textliquid
{% schema %}
{
"name": "Image with text",
"settings": [
{ "id": "product_source", "type": "select", "label": "Feature", "default": "all",
"options": [{ "value": "all", "label": "Newest product" }] },
{ "id": "product_limit", "type": "range", "label": "Products", "default": 1, "min": 1, "max": 1, "step": 1 },
{ "id": "reverse", "type": "checkbox", "label": "Image on the right", "default": false },
{ "id": "body", "type": "rich_text", "label": "Text", "default": "<p>Cut from washed linen, finished by hand in our Patan studio.</p>" }
]
}
{% endschema %}
{%- assign uid = section.id -%}
{%- assign item = products | first -%}
<style>
.sp-{{ uid }} { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 40px var(--gutter);
font-family: var(--font-body); color: var(--color-text); }
{%- if section.settings.reverse %} .sp-{{ uid }} > :first-child { order: 2; } {% endif %}
.sp-{{ uid }} img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.sp-{{ uid }} h2 { font-family: var(--font-heading); margin: 0 0 8px; }
@media (max-width: 640px) { .sp-{{ uid }} { grid-template-columns: 1fr; } .sp-{{ uid }} > :first-child { order: 0; } }
</style>
{%- if item -%}
<section class="sp-{{ uid }}">
<img src="{{ item.featured_image | image_url: 900 }}" alt="{{ item.title | escape }}" loading="lazy">
<div>
<h2>{{ item.title }}</h2>
<p style="font-size: 20px;">{{ item.price | money }}</p>
{{ section.settings.body }}
<a href="{{ item.url }}" data-joomni-action="cart-add" data-joomni-product-id="{{ item.id }}"
data-joomni-title="{{ item.title | escape }}" data-joomni-price="{{ item.price }}"
style="display: inline-block; padding: 12px 20px; background: var(--color-primary); color: var(--color-on-primary);
border-radius: var(--button-radius); text-decoration: none;">Add to cart</a>
</div>
</section>
{%- endif -%}

More to start from

Every preset in the section library is in the playground's Start from menu, from headers and footers to product pages and lookbooks.

Still stuck? Our team reads every message.

Need help?