Shopify Section Patterns

Create Shopify 2.0 section templates with Liquid, inline CSS, JavaScript, and JSON schema.

4|1|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/sarojpunde/shopify-dev-toolkit-claude-plugins --skill shopify-section-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Shopify Section Patterns
Source: https://github.com/sarojpunde/shopify-dev-toolkit-claude-plugins/tree/main/shopify-theme-development/skills/shopify-section-patterns
Command: npx skills add https://github.com/sarojpunde/shopify-dev-toolkit-claude-plugins --skill shopify-section-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill outlines section anatomy and practical patterns for creating Shopify 2.0 sections with Liquid, inline CSS, and JavaScript, improving maintainability and merchant customization.

Core Features & Use Cases

  • Section Anatomy & Best Practices: Liquid markup, optional inline styles/scripts, and schema configuration.
  • Common Patterns: Product Grid, Hero Banner, and Testimonials with section blocks.
  • Section Events: How to respond to theme editor events in JavaScript.

Quick Start

Create a simple product-grid section using the pattern template and hook into shopify:section:load for updates.

Frequently Asked Questions about Shopify Section Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Shopify 2.0 section with inline CSS and JavaScript?

Shopify 2.0 sections combine Liquid markup, optional inline CSS and JavaScript blocks, and a JSON schema for Theme Editor configuration. Use the section anatomy pattern: markup at the top, {% stylesheet %} and {% javascript %} blocks for styles and behavior, and {% schema %} at the bottom to define customizable settings and blocks.

What's the best way to build a Product Grid or Hero Banner section for Shopify themes?

Use the common section patterns provided: define your Liquid structure, add inline CSS for styling, include inline JavaScript to handle Theme Editor events like shopify:section:load, and configure the JSON schema with merchant-facing settings. This approach standardizes reusable sections and enables live customization.

How do I respond to theme editor events in a Shopify section?

Hook into shopify:section:load and other theme editor events using inline JavaScript within your section file. This lets you update section behavior dynamically when merchants change settings or load sections in the editor, supporting responsive customization workflows.

Do I need inline CSS and JavaScript, or can I use external stylesheets in Shopify sections?

Shopify 2.0 sections support inline CSS and JavaScript when settings require dynamic styles or behavior specific to that section. External stylesheets work too, but inline blocks provide section-scoped styling and logic, reducing conflicts and improving maintainability for merchant-customizable themes.

What role does the JSON schema play in Shopify section development?

The JSON schema drives Theme Editor customization by defining which settings merchants can control, organizing them into logical groups, and supporting nested blocks for repeatable content like product items. Schema configuration makes sections flexible and user-friendly without code changes.