Banner Component

Convert banner HTML to Liquid for Shopify

Turn promo banners, announcement bars, and split campaign strips into Shopify sections with schema-driven copy, links, and color controls.

Component overview

Banner sections merchants update every campaign

Banner HTML patterns

Announcement bars, slim promo strips, and dismissible top bars are usually flat sections—one message, one link, optional countdown text. Split campaign banners may use two-column flat settings (text + image) rather than blocks.

Conversion strategy

Flat mode for single-instance bars. Map copy to text/richtext, CTA to text+url pair, background to color or image_picker. For rotating promos with multiple messages, switch to Block mode with one block per message row.

Schema for promo banners

text: message, url: link, checkbox: show_bar, color or color_scheme integration. Optional range for bar padding. Dismissible bars need checkbox + localStorage note in handoff doc (theme-level JS pattern).

CSS considerations

Banners often sit in header group or top of index.json—verify z-index against sticky headers. Full-width backgrounds need box-sizing and padding scoped to section.id. Test long promo copy on 320px widths.

Common banner mistakes

Block mode for a single line promo (unnecessary editor complexity). Hardcoded #000 backgrounds merchants cannot change. Missing escape on announcement text. Link field as text type accepting malformed URLs.

Banner QA checklist

Toggle show/hide works. Link opens correct URL. Text wraps on mobile without overflow. Bar does not cover mobile menu trigger. Staging test with announcement + header group together.

Examples

Banner HTML to Liquid conversion example

How a promo strip becomes an editable Shopify section.

HTML structure

<div class="promo-banner">
  <p>Free shipping over $50</p>
  <a href="/collections/all">Shop now</a>
</div>

Single-instance markup maps to section.settings—not blocks—for fast merchant editing.

Liquid output

<div class="promo-banner">
  <p>{{ section.settings.text }}</p>
  <a href="{{ section.settings.link }}">
    {{ section.settings.button_label }}
  </a>
</div>

Static copy and href values become section.settings output tags.

Schema settings

"settings": [
  { "type": "text", "id": "text", "label": "Banner text" },
  { "type": "text", "id": "button_label", "label": "Button label" },
  { "type": "url", "id": "link", "label": "Link" },
  { "type": "color", "id": "bg_color", "label": "Background" }
]

Typed settings render as text fields, URL picker, and color swatch in the editor.

Scoped CSS

#shopify-section-{{ section.id }} .promo-banner {
  background: {{ section.settings.bg_color }};
}

Styles scoped with section.id prevent banner CSS from affecting other sections.

Use cases

Shopify banner use cases

Banner types agencies convert from HTML most often.

Promotional banners

Sale callouts and limited-time offers with editable text, CTA, and background color settings.

Announcement bars

Top-of-page shipping and policy messages merchants update without code changes.

Split banners

Two-column campaign strips with image, copy, and link settings on each side.

Workflow

How banner conversion works

Paste banner HTML and export a Flat-settings section with scoped CSS and validated schema.

  1. 01

    Paste HTML

    Import promo bar or split banner markup.

  2. 02

    Analyze structure

    Map text, links, and colors to setting candidates.

  3. 03

    Generate Liquid

    Replace static values with section.settings output.

  4. 04

    Generate schema

    Create typed settings and a named preset.

  5. 05

    Export section

    Add the banner to your theme header or templates.

Related

Guide

HTML to Liquid Converter

Free guide — paste component HTML and export a complete Shopify section file.

Open guide →

Tool

Open converter workspace

Paste component HTML and export a complete Shopify section file.

Open guide →

Generator

Shopify Section Generator

Generate OS 2.0 sections with schema, blocks, and presets.

Open guide →

Schema

Liquid Schema Generator

Design schema JSON that pairs with converted component Liquid.

Open guide →

Tool

Shopify Liquid Converter

Convert HTML markup into clean Shopify Liquid templates.

Open guide →

Blog

Component conversion guides

Read tutorials on sections, schema, and block patterns.

Open guide →

Theme

HTML to Dawn Theme

Ship FAQ and content sections on Shopify's reference theme.

Open guide →

Theme

HTML to Prestige Theme

Adapt component sections for Prestige editorial storefronts.

Open guide →

Theme

HTML to Broadcast Theme

Deploy story-driven component sections on Broadcast.

Open guide →

Theme

HTML to Impulse Theme

Use conversion-focused component sections on Impulse.

Open guide →

Component

Convert FAQ HTML to Liquid

Turn accordion FAQs into block-based Shopify sections.

Open guide →

Component

Convert slider HTML to Liquid

Map carousels to reorderable slide blocks.

Open guide →

Component

Convert hero section HTML to Liquid

Build campaign heroes with editable headings and CTAs.

Open guide →

Component

Convert product grid HTML to Liquid

Wire collection-driven product grids with schema controls.

Open guide →

Component

Convert tabs HTML to Liquid

Convert tabbed panels into merchant-editable sections.

Open guide →

Component

Convert accordion HTML to Liquid

Export collapsible panels as repeatable Shopify blocks.

Open guide →

Convert HTML to Shopify Liquid

Paste HTML & generate Liquid with schema, blocks, and scoped CSS. No signup required.