Skip to content

Collection Tabs Product Grid for Shopify

Shopify section with pill tabs for up to four collections, each showing a product grid with sale and compare-at prices, sold out badges and a View all link.

Also known as: shopify collection tabs section, shopify product tabs home page, tabbed product grid shopify, shopify featured collection tabs, shopify tabs new arrivals best sellers

Preview with sample data

Open in new tab

Liquid code

A collection tabs section for Shopify: pill-shaped tabs for up to four collections, each with its own product grid, sale prices and a View all link. Use it on the home page to show new arrivals, best sellers and current offers in the space of one section. Copy section.liquid into your theme's sections folder and add it from the theme editor as "WDS Collection tabs".

How it works

Each tab is a block that points to a collection. The section renders every tab's products on the server, so switching tabs is instant and needs no extra requests. Product cards show the featured image, title and price. When a product has a compare-at price above its price, the card shows a Sale badge, the sale price and the struck-through regular price. Sold out products get a Sold out badge, and products with variant prices start with "From".

The grid has four columns on desktop and two on mobile by default. On narrow screens the tab row scrolls sideways, and the selected tab scrolls into view. Below each grid, a View all link goes to that tab's collection.

Until a collection is chosen, a tab shows sample cards with placeholder images, so the section looks complete as soon as you add it. When you select a tab block in the theme editor, that tab opens.

Customization

In the theme editor:

  • Heading, Subheading and Heading and tabs alignment (left or center).
  • Products per tab, Columns on desktop, Columns on mobile and Image shape (square, portrait or landscape).
  • Show vendor and Show "View all" link.
  • Collection and Tab label on each tab block. An empty label uses the collection title.
  • Labels: View all, Sale badge, Sold out badge, the price prefix and the hidden screen reader texts.
  • Background, Text, Accent (active tab), Active tab text, Card and tab background and Sale price and badge colors.
  • Side padding, Top padding and Bottom padding.

Accessibility

The tabs follow the WAI-ARIA tabs pattern: a tablist with tab buttons and tabpanel regions, aria-selected and roving focus. Left and Right arrow keys move between tabs, Home and End jump to the first and last, and Tab moves into the products. Sale and regular prices have hidden labels for screen readers, the View all link names its collection, every control has a visible focus outline, and hover effects are turned off for people who prefer reduced motion.

Usage notes

This section requires an Online Store 2.0 theme and inherits the theme's fonts.

The preview uses an invented store with photos from Unsplash; on your store the cards show your own products and images. Its links go nowhere.

Each tab shows the first products of its collection in the collection's sort order, up to Products per tab (max 12). All tabs are in the page from the start, so keep the product count moderate on a busy home page. Without JavaScript, only the first tab is visible. Badge text is white, so choose a dark enough sale color.

Collection Tabs Product Grid for Shopify at a glance

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

Questions about this section

Can I use the Collection Tabs Product Grid 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-collection-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-collection-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.

Collection Tabs Product Grid for Shopify – free Shopify product grid template
Collection Tabs Product Grid for Shopify · free Shopify product grid template

More Product Grids

Product Grid with Filters – free Tailwind CSS product grid template

Product Grid with Filters

Tailwind CSS category page with a collapsible filter sidebar, live result count, empty state and a product grid sortable by price, rating or date.

Product Listing Grid – free Bootstrap 5 product grid template

Product Listing Grid

Responsive Bootstrap 5 product grid with sale, new, bestseller and sold-out badges, color swatches, wishlist buttons, sorting and client-side pagination.

Build Your Own Bundle Section for Shopify – free Shopify product grid template

Build Your Own Bundle Section for Shopify

Shopify section where shoppers pick a set number of products from a collection, see them in a bundle tray with a live total, and add the whole bundle to the cart at once.

Responsive Product Grid with Sort Bar – free Pure CSS product grid template

Responsive Product Grid with Sort Bar

Pure CSS product grid with photo cards, a results count and a sort dropdown that reorders items by price, rating or date with vanilla JS.

Product Grid with Quick Add on Hover – free Tailwind CSS product grid template

Product Grid with Quick Add on Hover

Tailwind CSS product grid where a quick add bar slides up over each photo on hover or focus, with a live bag counter and wishlist toggle.