Slider Component

Convert slider HTML to Liquid for Shopify

Transform carousel and image slider HTML into Shopify sections with slide blocks, schema media settings, and drag-and-drop reordering in the theme editor.

Component overview

Slider sections that merchants can reorder

How sliders work as Shopify sections

Image sliders, hero carousels, and announcement rotators are staple storefront components. In Online Store 2.0, they ship as sections where each slide is typically a block—merchants add, remove, and reorder slides without touching Liquid.

Converting slider HTML to Liquid means identifying the repeating slide wrapper in your markup, mapping image sources and captions to block settings, and preserving navigation dots or arrows as section-level toggles.

Schema design for slide blocks

Each slide block usually carries image_picker, text heading, richtext body, and url settings for the CTA. Section-level schema controls autoplay, slide duration, arrow visibility, and dot navigation—behaviors that apply to the whole carousel, not individual slides.

The "{% schema %}" JSON must include a non-empty presets array with two or three sample slides so merchants see a working carousel immediately after inserting the section.

Responsive and performance considerations

Slider HTML often hides overflow and sets fixed heights that break on mobile. When converting, scope CSS to section.id and use responsive height or aspect-ratio settings so slides reflow cleanly on small screens.

Avoid embedding heavy inline scripts in converted output—Shopify sections work best with CSS transitions or theme-native slider utilities. The converter strips script tags and maps animation preferences to checkbox or select schema settings where possible.

Merchant workflow after export

In the theme editor, merchants see a block list labeled Slide 1, Slide 2, and so on. They swap campaign images, update promo copy, and reorder slides for seasonal launches. Block-based sliders are why agencies convert slider HTML to Liquid instead of shipping static carousels.

HTMLToLiquid Converter uses Block export mode for sliders—detecting repeated slide markup and generating the block loop, schema, and scoped CSS in one pass.

Examples

Slider HTML to Liquid conversion example

How a three-slide carousel becomes a block-based Shopify section.

HTML structure

<div class="slider">
  <div class="slide">
    <img src="hero-1.jpg" alt="">
    <h2>Summer collection</h2>
  </div>
</div>

Repeated .slide children inside a .slider wrapper indicate a block loop candidate.

Liquid output

{% for block in section.blocks %}
  <div class="slide" {{ block.shopify_attributes }}>
    {{ block.settings.image | image_url: width: 1200 | image_tag }}
    <h2>{{ block.settings.heading }}</h2>
  </div>
{% endfor %}

Images and headings pull from block.settings; shopify_attributes enables editor highlighting.

Block schema

"type": "slide",
"settings": [
  { "type": "image_picker", "id": "image", "label": "Image" },
  { "type": "text", "id": "heading", "label": "Heading" },
  { "type": "url", "id": "link", "label": "Link" }
]

Each slide block exposes media, copy, and link settings merchants edit per slide.

Section settings

"settings": [
  { "type": "checkbox", "id": "autoplay", "label": "Autoplay" },
  { "type": "checkbox", "id": "show_arrows", "label": "Show arrows" }
]

Carousel behavior lives at section level—one toggle affects all slides.

Use cases

Shopify slider use cases

Common carousel patterns converted from HTML to Liquid.

Image sliders

Campaign heroes and lookbook carousels with per-slide imagery and editorial copy.

Announcement sliders

Rotating promo strips at the top of the page—each slide a block with text and link settings.

Collection sliders

Horizontal product or collection showcases with collection picker and slide blocks.

Workflow

How slider conversion works

Paste carousel HTML and export a block-based section with scoped CSS, schema, and validation.

  1. 01

    Paste HTML

    Import slider markup with all slide rows included.

  2. 02

    Analyze structure

    Detect slide wrappers and map media slots to blocks.

  3. 03

    Generate Liquid

    Compile block loop with image_tag and heading output.

  4. 04

    Generate schema

    Define slide block types and carousel section settings.

  5. 05

    Export section

    Download and add the slider section to your theme.

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