Z O B A E R

Loading

Guide Shopify guide

Shopify Product Page Tabs: How to Add Them (No App)

Three free ways to add tabs to a Shopify product page in Dawn and Horizon: collapsible rows, metafield content per product and tested horizontal tabs.
Zobaer Hossain
Zobaer H.Shopify Select Partner · 10+ years
Shopify product page tabs: how to add tabs to a Shopify product page without an app, guide by Zobaer H.

Shopify product page tabs turn one long wall of text into a few short, clear sections. Shoppers tap “Materials” or “Shipping” and find their answer fast. The product page also looks cleaner, because the details stay folded away until someone wants them.

The good news: you can add tabs to Shopify product page templates without an app. Dawn and Horizon, Shopify’s two free themes, already have drop-down rows built in. And if you want real side-by-side tabs, one Custom Liquid block does it without editing any theme files. I have set up product tabs on many client stores, and these are the three ways I use.

Here is what you will learn:

  • Way 1: drop-down rows in Dawn and Horizon, with no code
  • Way 2: different tab content for each product, with metafields
  • Way 3: true horizontal Shopify product tabs with a tested, copy-paste code block
  • Tabs or accordion: which one works better on phones
  • Common problems and how to fix them

Shopify product tabs in Dawn and Horizon: tabs or accordion?

First, a quick word on names. When store owners ask for Shopify product tabs, they mean one of two things:

  • Accordion rows sit on top of each other. You tap a heading, and the row opens downward. Dawn calls these Collapsible row blocks. Horizon calls them Accordion and Accordion row.
  • Horizontal tabs sit side by side in one line. You click a tab, and its content replaces the one below. Neither Dawn nor Horizon has a built-in block for this.

So if you only want to fold your details into neat sections, Way 1 gives you Shopify product page tabs in a few minutes. If you want the classic row of tabs, jump to Way 3.

Way 1: Add Shopify product tabs as collapsible rows (no code)

This is the fastest way to get Shopify product page tabs, and it works on every product at once. Each row has a heading and some content. Shoppers open only the rows they care about.

In the Dawn theme: Collapsible row blocks

  1. In your Shopify admin, go to Online Store, then Themes, and click Edit theme.
  2. In the drop-down at the top, choose Products, then Default product.
  3. In the left sidebar, find Product information and click Add block.
  4. Choose Collapsible row.
  5. Type a Heading, such as “Materials”.
  6. Pick an Icon from the list, or choose None.
  7. Add the text in Row content. Or, under Row content from page, choose a page you made under Online Store, then Pages.
  8. Repeat for each row you need, drag the rows under the description, and click Save.
Shopify product page tabs in Dawn: Collapsible row blocks in the theme editor
Dawn: each Collapsible row block becomes one of your Shopify product tabs, a drop-down row under the details.

The page option is handy for text you share across products, such as shipping and returns. Edit the page once, and every product shows the new text. I use the same block for size guides; my guide to adding a size chart in Shopify shows that setup step by step.

In the Horizon theme: Accordion and Accordion row

In Horizon, your Shopify product tabs are blocks inside blocks, so the steps look a little different.

  1. Open the theme editor and choose the Default product template, as above.
  2. In the Product information section, open the Details block.
  3. Under Details, click Add block and choose Accordion.
  4. Horizon adds three sample rows: Return policy, Shipping and Manufacturing. Click a row to change its Heading.
  5. Click the Text block inside each row and type your content. You can also add other blocks inside a row, such as an Image or a Page block.
  6. Tick Open row by default on the row you want open when the page loads. Then click Save.

On the Accordion block itself, you can switch the Icon between Caret and Plus and turn Dividers on or off.

Way 2: Give each product its own Shopify product tabs

Here is the catch with Way 1. Text you type into a row shows on every product that uses the template. That is fine for shipping info. It is wrong for things like materials or care steps, which change per product.

The fix is a product metafield: a custom field on each product that the row reads from. Shopify walks through the same idea in its care instructions metafield tutorial.

  1. Create the field. Go to Settings, then Metafields and metaobjects, then Product metafields. Click Add definition and name it, for example “Materials”. Choose Multi-line text as the type, or Rich text if you want bold text and lists. Save.
  2. Fill it in per product. Open a product, scroll to Product metafields, click your new field and type the content. Save.
  3. Connect it in Dawn. Select your Collapsible row. Next to Row content, click the Connect dynamic source icon and pick your field.
  4. Connect it in Horizon. Select the Text block inside your Accordion row. Click the Connect dynamic source icon and pick your field.
  5. Click Save and check two products. Each one should show its own text.
Shopify product tabs per product: a Horizon Accordion row connected to a product metafield
Horizon: the Text block inside an Accordion row reads a metafield, so your Shopify product tabs show different content on every product.

Want a whole row of questions and answers? An FAQ tab works well for this. My Shopify FAQ page guide shows how to write the questions shoppers really ask, and you can reuse them here.

Way 3: Real horizontal Shopify product page tabs with Custom Liquid

If you want tabs side by side, use the code below. It goes into a Custom Liquid block, so you don’t touch any theme files. The code lives in the block’s settings, and there is no edited file to redo after a theme update.

The code builds the Shopify product page tabs from content you already have:

  • The text before the first heading in your description becomes the “Description” tab.
  • Each H3 heading in your description starts a new tab, with the heading as the tab name.
  • A “Care guide” tab is added when the product has Shopify’s standard Care guide metafield filled in (the one from Shopify’s tutorial in Way 2).
  • A “Shipping & returns” tab is added from a page with the handle shipping-returns, if that page exists.

Step 1: Add headings to your product description

Open a product and go to the description. Put each section under its own heading, such as “Materials” or “Size & fit”. Select the heading line, click the Formatting button and pick the third heading level (H3). Products without any H3 headings still work. They simply get fewer tabs.

Step 2: Add the Custom Liquid block

  • Dawn: in Product information, click Add block and choose Custom Liquid.
  • Horizon: under Details in Product information, click Add block and choose Custom Liquid.

Paste this code into the Liquid code box, then drag the block to where your description sits.

{%- liquid
  assign first_tab = 'Description'
  assign lt = '<'
  assign h_open = lt | append: 'h3'
  assign h_close = lt | append: '/h3>'
  assign source = product.description

  assign care = product.metafields.descriptors.care_guide
  if care != blank
    assign care_html = care | metafield_tag
    assign source = source | append: h_open | append: '>Care guide' | append: h_close | append: care_html
  endif

  assign shared = pages['shipping-returns']
  if shared.content != blank
    assign source = source | append: h_open | append: '>Shipping & returns' | append: h_close | append: shared.content
  endif

  assign parts = source | split: h_open
  assign uid = 'ptabs-' | append: product.id
  assign n = 0
  assign tabs = ''
  assign panels = ''
-%}
{%- for part in parts -%}
  {%- liquid
    if forloop.first
      assign title = first_tab
      assign body = part
      assign check = body | strip_html | strip
      if check == ''
        continue
      endif
    else
      assign head = part | split: h_close | first
      assign title = h_open | append: head | strip_html | strip | default: 'Details'
      assign body = part | remove_first: head | remove_first: h_close
    endif
    assign n = n | plus: 1
  -%}
  {%- capture tabs -%}{{ tabs }}<button type="button" role="tab" id="{{ uid }}-t{{ n }}" aria-controls="{{ uid }}-p{{ n }}" aria-selected="{% if n == 1 %}true{% else %}false{% endif %}"{% if n != 1 %} tabindex="-1"{% endif %}>{{ title | escape_once }}</button>{%- endcapture -%}
  {%- capture panels -%}{{ panels }}<div class="ptabs__panel rte" role="tabpanel" id="{{ uid }}-p{{ n }}" aria-labelledby="{{ uid }}-t{{ n }}" tabindex="0"{% if n != 1 %} hidden{% endif %}>{{ body }}</div>{%- endcapture -%}
{%- endfor -%}
{%- if n > 0 -%}
<div class="ptabs" data-ptabs>
  <div class="ptabs__list" role="tablist" aria-label="Product details">{{ tabs }}</div>
  {{ panels }}
</div>
{%- endif -%}
<style>
  .ptabs { width: 100%; min-width: 0; margin: 24px 0; }
  .ptabs__list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid rgba(128, 128, 128, 0.35); }
  .ptabs__list::-webkit-scrollbar { display: none; }
  .ptabs [role="tab"] { flex: none; margin: 0 0 -1px; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: inherit; font: inherit; opacity: 0.7; cursor: pointer; white-space: nowrap; }
  .ptabs [role="tab"][aria-selected="true"] { opacity: 1; font-weight: 600; border-bottom-color: currentColor; }
  .ptabs [role="tab"]:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
  .ptabs__panel { padding: 16px 0; overflow-wrap: break-word; }
  .ptabs__panel[hidden] { display: none; }
  .ptabs__panel img { max-width: 100%; height: auto; }
  .ptabs__panel table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
  .ptabs__panel :is(th, td) { padding: 6px 10px; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; }
</style>
<script>
  (function () {
    if (window.ptabsReady) return;
    window.ptabsReady = true;
    function pick(tab) {
      var box = tab.closest('[data-ptabs]');
      box.querySelectorAll('[role="tab"]').forEach(function (t) {
        var on = t === tab;
        t.setAttribute('aria-selected', on ? 'true' : 'false');
        t.tabIndex = on ? 0 : -1;
        box.querySelector('#' + t.getAttribute('aria-controls')).hidden = !on;
      });
      tab.focus();
      tab.scrollIntoView({ block: 'nearest', inline: 'nearest' });
    }
    document.addEventListener('click', function (e) {
      var tab = e.target.closest('[data-ptabs] [role="tab"]');
      if (tab) pick(tab);
    });
    document.addEventListener('keydown', function (e) {
      var tab = e.target.closest('[data-ptabs] [role="tab"]');
      if (!tab) return;
      var all = Array.prototype.slice.call(tab.parentNode.querySelectorAll('[role="tab"]'));
      var i = all.indexOf(tab);
      var go = { ArrowRight: i + 1, ArrowLeft: i - 1 + all.length, Home: 0, End: all.length - 1 }[e.key];
      if (go === undefined) return;
      e.preventDefault();
      pick(all[go % all.length]);
    });
  })();
</script>

Step 3: Hide the old description

Your description now lives inside the tabs, so hide the old copy. In Dawn, click the eye icon on the Description block. In Horizon, hide the Text block under Details that shows the product description. Then click Save.

Add tabs to Shopify product page with a Custom Liquid block: horizontal tabs from description headings
One Custom Liquid block builds Shopify product page tabs from your description headings, a metafield and a page.

How to change the code

  • First tab name: change ‘Description’ near the top.
  • Your own metafield: replace descriptors.care_guide with your field’s namespace and key, for example custom.materials, and change ‘Care guide’ to the tab name you want.
  • Another page: replace shipping-returns with your page’s handle. Delete that whole if part if you don’t need it.
  • H2 instead of H3: change ‘h3’ to ‘h2’ in the h_open and h_close lines.

How I tested it

I tested these Shopify product page tabs with sample products. I rendered the code and loaded the real Dawn and Horizon base styles, at 390 px (a phone) and 1280 px (a laptop). The checks:

  • Clicking a tab shows only its panel.
  • The arrow keys move between tabs, and Home and End jump to the first and last one.
  • The markup uses the standard tab roles that screen readers expect (role=”tablist”, “tab” and “tabpanel”, plus aria-selected).
  • Nothing spills past the screen edge. On phones the tab row scrolls sideways, and wide tables scroll inside their tab.
  • Products without headings, metafields or a page still show the right number of tabs, and an empty product shows nothing.

Shopify product page tabs vs accordion: which is better on mobile?

Honest answer: on phones, an accordion usually wins. Shoppers scroll down, and an accordion keeps everything in that same direction. Tabs need a sideways row. With four or five tabs on a narrow screen, the last tabs sit off to the right, and some shoppers never see them.

On a laptop, tabs look tidy, and three to five short labels fit in one line. So here is how I decide:

PointTabsAccordion
PhonesRow scrolls sidewaysNatural up and down
LaptopsClean, one lineFine, a bit longer
Best number3 to 5 short labelsAny number
See all headingsNot on small screensYes, stacked
Setup in Dawn and HorizonCustom Liquid codeBuilt-in blocks

If most of your visitors shop on phones, start with accordion rows. If you use Shopify product page tabs, keep the labels short, such as “Details”, “Fit” and “Care”, so more of them fit on screen.

Shopify product page tabs on a phone: horizontal tabs compared with accordion rows
On a phone, Shopify product page tabs scroll sideways (left), while accordion rows stack and show every heading (right).

Which way should you use?

Here is how the three ways to add tabs to Shopify product page content compare in each theme.

WayDawnHorizonBest for
1. Drop-down rowsCollapsible rowAccordion rowMost stores
2. Per product contentRow + metafieldText + metafieldMaterials, care, specs
3. Horizontal tabsCustom LiquidCustom LiquidDesktop-heavy stores

Most stores do best with Way 1 plus Way 2. A product tabs app makes sense only for extras, such as tabs by collection or tag, or a visual style editor. Those apps usually add their own code and often a monthly fee. If you are not sure which theme you have or which one suits you, my Dawn vs Horizon comparison helps.

Common problems with Shopify product page tabs

Every product shows the same tab content

You typed the text into the block itself, so it shows on every product. Move that content into a product metafield and connect it with the dynamic source icon, as in Way 2.

An empty row still shows on some products

Dawn’s Collapsible row and Horizon’s Accordion row keep their heading even when the metafield is empty. Fill the field on every product, or make a second product template without that row. You can pick the template on each product under Theme template. The Custom Liquid tabs skip empty content by themselves.

The Connect dynamic source icon doesn’t show my metafield

The field type doesn’t match the setting. Row content and Text accept text types such as Multi-line text and Rich text. Row content from page and the Page block need a metafield of the Page type.

Only one tab shows up

Your headings are probably not H3. Many descriptions copied from suppliers use bold text or H2 instead. Change the headings to H3, or switch the code to ‘h2’. Also check that the shipping-returns page exists and has content.

The description shows twice

The old Description block (Dawn) or description Text block (Horizon) is still visible. Hide it with the eye icon and save.

Frequently asked questions

How do I add tabs to Shopify product page without an app?

For drop-down rows, add Collapsible row blocks in Dawn or an Accordion block in Horizon. For horizontal tabs, add a Custom Liquid block with the code from this guide.

Does the Shopify Dawn theme have product tabs?

Dawn has Collapsible row blocks, which open downward like an accordion. It has no horizontal tab block, so side-by-side tabs need a Custom Liquid block or an app.

Can a collapsible row be open by default?

In Horizon, yes: tick Open row by default on the Accordion row. Dawn’s Collapsible row has no such setting, so its rows always start closed.

How do I put the product description in a collapsible row?

In Dawn, click the dynamic source icon next to Row content and pick the product description. In Horizon, connect a Text block inside the row to the description. Then hide the original description so it doesn’t show twice.

Can I add an image to a collapsible row in Shopify?

In Horizon, add an Image block inside the Accordion row. In Dawn, put the image on a page and choose that page under Row content from page.

Do Shopify product page tabs hurt SEO?

Not with the methods in this guide. The content of every row and tab is in the page’s HTML, even while it is closed, so search engines can still read it.

Short, well-named Shopify product page tabs make a product page easier to scan, especially for shoppers comparing a few items. For more practical guides, see my Shopify tips. If you want your whole product page reworked, layout, tabs and all, that is part of my Shopify store redesign service. Message me on WhatsApp and I will take a look.

Zobaer Hossain, Shopify designer

Written by Zobaer H.

Shopify Select Partner with 10+ years of experience and 5,000+ clients. I design and build Shopify stores, and I write these guides from real client work.

Shopify Select Partner badge

In this guide

    ★★★★★ 4.9 from 1,350+ client reviews

    Let's start

    Ready to start your store?

    Send me your idea or store link. I'll reply with honest advice and a fixed quote.

    ✓ Free quote✓ Fixed price✓ You own everything