Examples

Shopify Liquid examples for common sections

Copy-ready patterns for heroes, FAQs, collection rows, product grids, tabs, and accordions—the components every theme developer rebuilds on every project.

2 min read · Published 2026-06-08

Knowledge Hub

How to use these examples

Each example shows the Liquid pattern, the schema shape, and when to use Flat settings vs blocks. Adapt class names to your theme. For full HTML-to-section conversion, use /converter or read /convert-hero-section-html-to-liquid and related component guides.

Hero section example

Heroes are single-instance layouts—use section.settings for heading, subheading, CTA, and background image. Flat export mode in the converter handles this pattern automatically.

Hero Liquid

<div class="hero">
  <h1>{{ section.settings.heading }}</h1>
  <p>{{ section.settings.subheading }}</p>
  <a href="{{ section.settings.button_link }}">
    {{ section.settings.button_label }}
  </a>
</div>

FAQ accordion example

FAQ rows are classic block content—each question and answer is a block merchants reorder. Use details/summary for accessible accordions.

FAQ block loop

{% for block in section.blocks %}
  <details {{ block.shopify_attributes }}>
    <summary>{{ block.settings.question }}</summary>
    <div>{{ block.settings.answer }}</div>
  </details>
{% endfor %}

Collection and product grid examples

Product grids wire to Shopify collection objects. Assign the collection from settings, loop products, and render cards with live price and image data.

Featured collection loop

{% assign col = section.settings.collection %}
{% for product in col.products limit: section.settings.limit %}
  <a href="{{ product.url }}">
    {{ product.featured_image | image_url: width: 600 | image_tag }}
    <span>{{ product.title }}</span>
    <span>{{ product.price | money }}</span>
  </a>
{% endfor %}

Tabs example

Tab panels map to blocks with label and richtext content settings. Section-level settings control tab style. See /convert-tabs-html-to-liquid for conversion workflow.

Tab block loop

{% for block in section.blocks %}
  <button>{{ block.settings.label }}</button>
  <div>{{ block.settings.content }}</div>
{% endfor %}

Accordion example

Accordions extend the FAQ pattern with richer richtext bodies and optional icons per row. Product detail pages use accordion_item blocks for materials, sizing, and care instructions.

Accordion block

{% for block in section.blocks %}
  <details class="accordion__item" {{ block.shopify_attributes }}>
    <summary>{{ block.settings.title }}</summary>
    <div class="accordion__body">{{ block.settings.content }}</div>
  </details>
{% endfor %}

Promo banners typically use Flat settings—text, url, and color fields. No block loop required. Convert from HTML with /convert-banner-html-to-liquid.

Announcement bar

<div class="announcement">
  <p>{{ section.settings.text }}</p>
  <a href="{{ section.settings.link }}">{{ section.settings.link_label }}</a>
</div>

From examples to production sections

  • Paste your HTML variant into /converter to generate schema automatically.
  • Cross-check setting ids against /shopify-schema-guide conventions.
  • Validate block limits and presets before client handoff.
  • Browse /shopify-liquid-cheatsheet for filter and tag reference.

Frequently asked questions

Should I copy these examples directly into themes?

Use them as patterns. Adapt class names, add scoped CSS, and complete schema with presets. The converter generates fuller section files from your actual HTML.

Start converting HTML

Paste your markup and export production-ready Shopify Liquid sections with schema and blocks.

Trust

Built for serious Shopify development

Production-ready sections, validated schema, and workflows theme engineers trust on client projects.

Production-ready output

Export complete section.liquid files with schema, presets, and scoped CSS ready for theme repos.

Built for Shopify developers

Designed for freelancers, agencies, and in-house teams shipping OS 2.0 sections weekly.

OS 2.0 compatible

Output follows Online Store 2.0 conventions—JSON templates, blocks, and valid schema JSON.

Schema validation

Automated checks catch missing presets, invalid setting ids, and common Liquid issues early.

AI-assisted workflow

Optional AI structure detection with deterministic fallback for reliable section generation.

Theme compatibility

Sections align with Dawn, Prestige, Broadcast, Impulse, and custom JSON-template themes.

Liquid BasicsKnowledge Hub

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML