Hero Component

Convert hero section HTML to Liquid

Transform campaign hero HTML into Shopify sections with schema-driven headings, CTAs, background media, and scoped CSS—ready for any Online Store 2.0 theme.

Component overview

Hero sections as the foundation of every storefront

Why hero sections dominate Shopify customization

The hero is the first section on most homepages—a full-width banner with headline, supporting copy, primary CTA, and background image or video. It sets brand tone and drives the first click. Nearly every Shopify rebuild includes at least one custom hero that standard theme sections cannot replicate.

Converting hero section HTML to Liquid is one of the highest-volume tasks in theme development. Designers deliver pixel-perfect HTML; developers must expose every editable element as a schema setting while preserving layout, overlay behavior, and responsive breakpoints.

Schema settings heroes typically need

A production hero schema usually includes: heading (text), subheading (text or richtext), button_label (text), button_link (url), background_image (image_picker), optional mobile_image (image_picker), text alignment (select), and overlay opacity (range). Advanced heroes add secondary CTA fields and color_scheme pickers.

Flat export mode fits heroes because they are single-instance layouts—not repeatable rows. The "{% schema %}" block should include a preset with sample copy so merchants see a complete hero on first insert.

Background media and overlay patterns

Hero HTML often uses background-image in CSS or an absolutely positioned img tag. Convert these to image_picker settings with image_url filters in Liquid. Overlay divs map to range settings for opacity—merchants tune contrast without editing CSS.

Video heroes should use video_url settings instead of hardcoded iframes. The converter replaces embed tags with theme-safe placeholders and schema fields merchants paste YouTube or Vimeo links into.

Responsive behavior and merchant control

Heroes stack copy above media on mobile, reduce heading size, and center-align CTAs. Scoped CSS with section.id handles breakpoints while schema range settings let merchants adjust padding per breakpoint where needed.

HTMLToLiquid Converter maps hero HTML to Flat settings, generates scoped styles, and outputs a section file compatible with Dawn, Prestige, Broadcast, and Impulse—validated before export.

Examples

Hero HTML to Liquid conversion example

How a campaign hero becomes an editable Shopify section.

HTML structure

<section class="hero">
  <h1>Winter collection</h1>
  <p>New arrivals are here.</p>
  <a href="/collections/winter">Shop now</a>
</section>

Single-instance hero markup maps to section.settings—not blocks—for headline, copy, and CTA.

Liquid output

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

Every editable text node and link becomes a section.settings reference.

Schema settings

"settings": [
  { "type": "text", "id": "heading", "label": "Heading" },
  { "type": "text", "id": "subheading", "label": "Subheading" },
  { "type": "image_picker", "id": "bg_image", "label": "Background" },
  { "type": "url", "id": "button_link", "label": "Button link" }
]

Typed settings give merchants text fields, image upload, and URL picker in the editor.

Background Liquid

{{ section.settings.bg_image
  | image_url: width: 2000
  | image_tag: class: 'hero__bg' }}

image_picker settings use Shopify image filters for responsive, CDN-backed delivery.

Use cases

Shopify hero use cases

Hero variants agencies convert from HTML regularly.

Full-width campaign heroes

Seasonal launches with background media, overlay text, and dual CTA schema settings.

Split heroes

Image-left, copy-right layouts with independent media and text settings per column.

Video heroes

video_url settings replace hardcoded embeds—merchants swap campaign videos in the editor.

Workflow

How hero conversion works

Paste hero HTML and export Flat-settings Liquid with scoped CSS, schema, and validation.

  1. 01

    Paste HTML

    Import hero markup with heading, copy, CTA, and media.

  2. 02

    Analyze structure

    Map text nodes, images, and links to setting types.

  3. 03

    Generate Liquid

    Compile hero Liquid with section.settings output.

  4. 04

    Generate schema

    Create settings, preset, and scoped CSS block.

  5. 05

    Export section

    Add hero section.liquid to your theme templates.

Explore

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.

Generate Shopify sections

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

Start converting HTML