Skip to content

Product Information Tabs for Shopify

Shopify section: product description, details, shipping and care in ARIA tabs with arrow-key support, turning into an accordion on mobile. Tabs can show a page.

Also known as: shopify product tabs section, product description tabs shopify, shopify tabs accordion mobile, shipping and returns tab shopify

Preview with sample data

Open in new tab

Liquid code

A product information tabs section for Shopify. It puts the product description, details, shipping and returns, and care instructions under one row of tabs below the product, and turns into an accordion on phones. Use it to keep long product pages short and easy to scan. Copy section.liquid into your theme's sections folder and add it from the theme editor as "WDS Product tabs".

How it works

Each tab is a block. The Product description block shows the product's own description and is skipped for products that have none. A Text or page block shows rich text, or the content of a page you pick, so one shipping and returns page can serve every product and stays up to date in one place.

On screens 750 px and wider, the tabs sit in a row with a thin divider, and an accent underline marks the active tab. On smaller screens the same content becomes an accordion: each item has its own heading button, and the first one can start open. When the screen size changes, the shopper stays on the same content.

In the theme editor, selecting a block opens its tab, so you see the content you are editing.

Customization

All of these are in the theme editor:

  • Heading: optional heading above the tabs.
  • Tabs name (screen readers): names the tab list.
  • Tab alignment: left or center.
  • Content width and Open the first item on mobile.
  • Tab title on each block, plus Text and Page on Text or page blocks.
  • Background, Text and Accent colors: the accent colors the active underline, the accordion icons, links and focus outlines.
  • Side padding, Top padding and Bottom padding.

Accessibility

The tabs follow the ARIA tabs pattern: role="tablist", tab and tabpanel, with aria-selected and aria-controls. Arrow Left and Arrow Right move between tabs and show them, and Home and End jump to the first and last tab. Only the active tab is in the Tab order, and the panel itself can be focused. On mobile each accordion button sits in a heading and uses aria-expanded, and panels become labelled regions. Focus outlines are visible, and animations are turned off for people who prefer reduced motion.

Usage notes

This section requires an Online Store 2.0 theme. Fonts come from your theme. Add it to your product template below the product information. If your theme already shows the description in the product column, leave out the Product description block to avoid showing it twice.

The preview uses sample text for an invented product and no photos. Outside a product page, for example on the home page, the Description tab shows sample text. Tab content is plain HTML from Shopify, so very wide tables inside a description may need their own styling.

Product Information Tabs for Shopify at a glance

Framework
Shopify
Code
Liquid
JavaScript
Not needed
Dependencies
fonts.googleapis.com
Layout
Responsive, works on mobile
Category
Product Details
License
Free for personal and commercial use

Questions about this section

Can I use the Product Information Tabs for Shopify code for free?

Yes. You can copy or download the Liquid code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my Shopify store?

Create a new section named shopify-product-tabs in your theme code editor, paste the Liquid code and save. Then add the section to a page in the theme editor. It works with Online Store 2.0 themes.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

How to install

  1. In your Shopify admin, go to Online Store > Themes, open the theme's menu and choose Edit code.
  2. Under Sections, add a new section named shopify-product-tabs, replace its contents with the Liquid code above and save.
  3. Open the theme editor, choose Add section and add it to the page.

Requires an Online Store 2.0 theme. Try it on a copy of your theme first. WebDevSnippets is not affiliated with or endorsed by Shopify.

Product Information Tabs for Shopify – free Shopify product detail page template
Product Information Tabs for Shopify · free Shopify product detail page template

More Product Details

Bootstrap Product Page – free Bootstrap 5 product detail page template

Bootstrap Product Page

Bootstrap 5 product details page with image gallery, color and size pickers, quantity stepper, and tabs for description, specifications and customer reviews.

Product Detail with Gallery – free Tailwind CSS product detail page template

Product Detail with Gallery

Dark Tailwind CSS product page section with a thumbnail image gallery, finish options, quantity stepper and add to cart button with loading state.

Size Guide Popup for Shopify – free Shopify product detail page template

Size Guide Popup for Shopify

Shopify section: a Size guide link on product pages that opens an accessible dialog with a size chart from blocks, a cm / in toggle and how-to-measure notes.

Frequently Bought Together Section for Shopify – free Shopify product detail page template

Frequently Bought Together Section for Shopify

Shopify section that shows the current product with up to 3 picked products, checkboxes, variant selects, a live total and one button that adds everything checked to the cart.

Sticky Add to Cart Bar for Shopify – free Shopify product detail page template

Sticky Add to Cart Bar for Shopify

Shopify section: a bar fixed to the bottom of product pages that appears once the main add-to-cart button scrolls away, with image, price, variant select and a real product form.