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

Tabs HTML structure

Tab panels share a tablist + tabpanel pattern. Each panel is a block candidate (title + richtext body). Section settings control default active tab and layout (horizontal vs vertical on desktop).

Liquid conversion

Block mode: one block per tab with title and content settings. Loop renders buttons and panels; use forloop.first or section.settings.default_tab for initial active state. Single tab script at section level reading data-tab attributes—not per block.

Schema design

Block type tab with text title + richtext content. Section: layout select, default_tab index or first-tab checkbox. Preset with 3 tabs (Shipping, Returns, Care) for size-guide use cases.

Accessibility

Tab buttons need role=tab, aria-selected, aria-controls matching panel ids. Keyboard arrow navigation if mimicking native tabs. Do not hide inactive panels with display:none without aria-hidden management if using custom JS.

Tab pitfalls

Separate block loops for buttons and panels (order drift on reorder). Inline onclick per block. richtext content outside .rte. Merchants add 12 tabs with no max_blocks—sidebar unusable.

Tabs QA checklist

Reorder blocks updates tab order consistently. Active tab setting works. Mobile layout (accordion fallback) if designed. Keyboard focus visible. Policy links inside richtext work.

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.

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 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 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.