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
Slider HTML anatomy
Look for .slide, .swiper-slide, or carousel-item siblings inside one track wrapper. Navigation arrows and dots are section-level settings, not per-slide fields. Separate hero carousel (one per page) from product thumbnail sliders (different schema needs).
Liquid strategy
Block loop per slide with image_picker, heading, richtext, url settings. Use image_url width caps (1200–1600) on slide images. Section settings: autoplay checkbox, arrow visibility, dot navigation. Single deferred script outside the loop—never per-slide scripts.
Performance notes
Hero/LCP slide: loading eager, not lazy. Below-fold carousels: lazy load slide images. Set max_blocks to prevent merchants adding dozens of full-width PNG slides. Avoid loading slider library globally if theme already includes one.
Merchant customization
Merchants swap campaign images and reorder slides seasonally. Block labels 'Slide' with image previews in editor reduce support tickets. Preset with 2–3 slides demonstrates carousel behavior immediately.
Slider conversion pitfalls
Inlining Swiper init inside the block loop. Fixed height CSS that crops images on mobile. Missing shopify_attributes. Autoplay on accessibility-sensitive pages without merchant toggle to disable.
Slider QA checklist
Reorder blocks updates slide order on storefront. Autoplay toggle works. Arrow/dot settings respected. No console errors from duplicate JS. Mobile swipe still functional after theme integration.
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.
- 01
Paste HTML
Import slider markup with all slide rows included.
- 02
Analyze structure
Detect slide wrappers and map media slots to blocks.
- 03
Generate Liquid
Compile block loop with image_tag and heading output.
- 04
Generate schema
Define slide block types and carousel section settings.
- 05
Export section
Download and add the slider section to your theme.
Related
Related tools and component guides
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 banner HTML to Liquid
Export promo and announcement banners with schema settings.
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.