How to Create a Responsive Grid Layout for Featured Collections / Products

How to Create a Responsive Grid Layout for Featured Collections / Products

This step-by-step tutorial will help you build a fully responsive grid layout for collections or products — without apps, using lightweight Shopify theme coding.

You can use this for:

  • Featured collections on the homepage
  • Product recommendations
  • Collection card grids
  • Sale items / new arrivals section

✨ Final Output You Will Get

A responsive grid that:

  • Shows 4 items on desktop
  • Shows 2 items on tablets
  • Shows 1 item on mobile

🧩 Step 1 — Create a New Section

Inside your Shopify admin:

  1. Go to Online Store → Themes
  2. Click Edit Code
  3. Open Sections folder
  4. Click Add a new section
  5. Name it: responsive-grid.liquid

Paste the following code:


{% assign grid_items = section.settings.collection.products | default: section.settings.collection_list %}

{{ section.settings.heading }}

{% for product in section.settings.collection.products limit: section.settings.limit %}{% if product.featured_image %} {{ product.title }} {% endif %}

{{ product.title }}

{{ product.price | money }}

{% endfor %}




{% schema %}
{
  "name": "Responsive Collection/Product Grid",
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "Section Heading",
      "default": "Featured Products"
    },
    {
      "type": "collection",
      "id": "collection",
      "label": "Select Collection"
    },
    {
      "type": "number",
      "id": "limit",
      "label": "Max Products to Show",
      "default": 8
    }
  ],
  "presets": [
    {
      "name": "Responsive Grid Layout"
    }
  ]
}
{% endschema %}

🧩 Step 2 — Add Section to Your Theme

Now add it to a template:

  1. Go to Online Store → Themes → Customize
  2. Open your Home Page or any template
  3. Click Add Section
  4. Select Responsive Grid Layout

Choose a collection → Save.


🎉 You're Done!

You now have a fully responsive collection/product grid that automatically adapts to all screen sizes.

This setup is flexible, lightweight, and app-free — ideal for performance and customization.

If you'd like, I can also create:

  • Grid with hover effects
  • Masonry grid layout
  • Animated product cards
  • Grid with infinite scroll or “Load More”

Just tell me!

Back to blog

Leave a comment