Tabs Component

Convert tabs HTML to Liquid for Shopify

Transform tabbed content panels into Shopify sections with block-based tabs, schema labels, and richtext bodies merchants edit in the theme editor.

Component overview

Tab sections for PDPs, policies, and feature breakdowns

How tabs work as Shopify sections

Tabbed interfaces organize dense content—product details, sizing charts, shipping policies, ingredient lists, and feature comparisons—behind clickable labels. On Shopify, tabs ship as sections where each panel is typically a block with a title setting and richtext body.

Converting tabs HTML to Liquid requires identifying the tab navigation list and panel content areas, then mapping each tab/panel pair to a block with label and content settings merchants can add or reorder.

Block schema for tab panels

Each tab block carries a text field for the tab label and a richtext field for panel content. Section-level settings control default active tab, tab style (underline vs pill), and optional section heading. The "{% schema %}" JSON defines a tab_panel block type with clear merchant-facing labels.

Presets should seed three tabs—Description, Shipping, and Returns—so the section is immediately usable on product templates. Merchants rename labels and replace body copy without touching Liquid.

JavaScript and accessibility considerations

Tab HTML often relies on inline JavaScript for panel switching. Shopify sections work best with minimal JS—use CSS :target, details/summary patterns, or a small scoped script bundled in the section. The converter preserves aria roles and tabindex attributes from your HTML where possible.

Keyboard navigation and focus management matter for accessibility. Converted tab sections should keep button elements for tab triggers with aria-selected and aria-controls attributes wired in Liquid.

Responsive tab behavior

On mobile, horizontal tab lists often overflow or convert to accordion-style stacked panels. Scoped CSS with section.id handles breakpoint switches while schema checkbox settings let merchants choose mobile accordion mode.

HTMLToLiquid Converter detects tab/panel pairs in HTML, exports them as blocks in Block mode, and generates scoped CSS plus validated schema for product and landing page templates.

Examples

Tabs HTML to Liquid conversion example

How a three-tab panel becomes a block-based Shopify section.

HTML structure

<div class="tabs">
  <button data-tab="desc">Description</button>
  <div id="desc">Product details here.</div>
</div>

Tab triggers paired with panel divs map to block.settings.label and block.settings.content.

Liquid output

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

Each tab panel renders from block settings inside a loop merchants control.

Block schema

"type": "tab_panel",
"settings": [
  { "type": "text", "id": "label", "label": "Tab label" },
  { "type": "richtext", "id": "content", "label": "Content" }
]

Block types define per-tab label and body fields in the theme editor.

Section settings

"settings": [
  { "type": "text", "id": "heading", "label": "Section heading" },
  { "type": "select", "id": "style", "label": "Tab style",
    "options": [{"value":"underline","label":"Underline"}] }
]

Section-level settings control heading and visual style across all tabs.

Use cases

Shopify tabs use cases

Tabbed content patterns converted from HTML to Liquid.

Product detail page tabs

Description, specs, and care instructions as reorderable tab blocks on product.json templates.

Feature comparison tabs

Plan or variant comparison panels with block-based labels and richtext content.

Policy and info tabs

Shipping, returns, and warranty tabs merchants update seasonally without code changes.

Workflow

How tabs conversion works

Paste tabbed HTML and export block-based panels with scoped CSS, schema, and validation.

  1. 01

    Paste HTML

    Import tab navigation and panel markup together.

  2. 02

    Analyze structure

    Pair tab triggers with panels and map to blocks.

  3. 03

    Generate Liquid

    Compile block loop with label and content output.

  4. 04

    Generate schema

    Define tab_panel blocks and section style settings.

  5. 05

    Export section

    Add tabs section to product or landing 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