بنقرة واحدة
shopify-schema-design
Best practices for creating comprehensive section schemas with all setting types
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Best practices for creating comprehensive section schemas with all setting types
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Prisma ORM best practices for Shopify apps including multi-tenant data isolation, query optimization, transaction patterns, and migration strategies. Auto-invoked when working with database operations.
Build consistent UI using Polaris Web Components patterns for common page layouts like index pages, detail pages, forms, and empty states. Use this skill when creating new pages or refactoring existing UI components.
Common Shopify Admin GraphQL API patterns for product queries, metafield operations, webhooks, and bulk operations. Auto-invoked when working with Shopify API integration.
Polaris composition patterns and page templates for common Shopify app layouts. Provides index tables, settings pages, dashboards, and resource management patterns. Auto-invoked when building page layouts.
Core Polaris Web Components fundamentals including component library structure, design tokens, responsive patterns, and SSR compatibility. Auto-invoked when working with Polaris components.
Internationalization fundamentals for multi-language Shopify themes
| name | Shopify Schema Design |
| description | Best practices for creating comprehensive section schemas with all setting types |
The {% schema %} tag defines how a section appears in the theme editor:
{
"name": "Section Name",
"tag": "section",
"class": "section-class",
"limit": 1,
"settings": [...],
"blocks": [...],
"presets": [...]
}
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Default text",
"info": "Helpful description",
"placeholder": "Enter text here"
}
{
"type": "textarea",
"id": "description",
"label": "Description",
"default": "Default description"
}
{
"type": "richtext",
"id": "content",
"label": "Content",
"default": "<p>Default rich text content</p>"
}
{
"type": "range",
"id": "padding",
"label": "Padding",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"default": 40,
"info": "Section padding in pixels"
}
{
"type": "checkbox",
"id": "show_vendor",
"label": "Show Product Vendor",
"default": true,
"info": "Display vendor name on product cards"
}
{
"type": "select",
"id": "layout",
"label": "Layout Style",
"options": [
{
"value": "grid",
"label": "Grid"
},
{
"value": "carousel",
"label": "Carousel"
},
{
"value": "list",
"label": "List"
}
],
"default": "grid",
"info": "Choose how products are displayed"
}
{
"type": "radio",
"id": "alignment",
"label": "Text Alignment",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "center",
"label": "Center"
},
{
"value": "right",
"label": "Right"
}
],
"default": "center"
}
{
"type": "color",
"id": "bg_color",
"label": "Background Color",
"default": "#ffffff",
"info": "Section background color"
}
{
"type": "color_background",
"id": "background_gradient",
"label": "Background Gradient",
"info": "Supports solid colors and gradients"
}
{
"type": "image_picker",
"id": "image",
"label": "Image",
"info": "Recommended size: 1600 x 900 px"
}
{
"type": "font_picker",
"id": "heading_font",
"label": "Heading Font",
"default": "assistant_n4",
"info": "Choose font for headings"
}
{
"type": "collection",
"id": "collection",
"label": "Collection"
}
{
"type": "product",
"id": "featured_product",
"label": "Featured Product"
}
{
"type": "product_list",
"id": "products",
"label": "Products",
"limit": 12,
"info": "Select up to 12 products"
}
{
"type": "collection_list",
"id": "collections",
"label": "Collections",
"limit": 8
}
{
"type": "blog",
"id": "blog",
"label": "Blog"
}
{
"type": "article",
"id": "article",
"label": "Article"
}
{
"type": "page",
"id": "page",
"label": "Page"
}
{
"type": "url",
"id": "button_link",
"label": "Button Link",
"info": "Link to internal page or external URL"
}
{
"type": "video_url",
"id": "video",
"label": "Video URL",
"accept": ["youtube", "vimeo"],
"info": "Supports YouTube and Vimeo"
}
{
"type": "html",
"id": "custom_html",
"label": "Custom HTML",
"info": "Add custom HTML code"
}
{
"type": "liquid",
"id": "custom_liquid",
"label": "Custom Liquid",
"info": "Add custom Liquid code"
}
{
"type": "header",
"content": "Section Heading"
}
{
"type": "paragraph",
"content": "Helpful information or instructions for merchants."
}
{% schema %}
{
"name": "Product Grid",
"tag": "section",
"class": "product-grid-section",
"settings": [
{
"type": "header",
"content": "Content"
},
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Featured Products"
},
{
"type": "richtext",
"id": "description",
"label": "Description"
},
{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
"type": "range",
"id": "products_count",
"label": "Number of Products",
"min": 2,
"max": 12,
"step": 1,
"default": 4
},
{
"type": "header",
"content": "Layout"
},
{
"type": "select",
"id": "layout",
"label": "Layout Style",
"options": [
{
"value": "grid",
"label": "Grid"
},
{
"value": "carousel",
"label": "Carousel"
}
],
"default": "grid"
},
{
"type": "select",
"id": "columns_desktop",
"label": "Desktop Columns",
"options": [
{
"value": "2",
"label": "2"
},
{
"value": "3",
"label": "3"
},
{
"value": "4",
"label": "4"
}
],
"default": "4"
},
{
"type": "select",
"id": "columns_mobile",
"label": "Mobile Columns",
"options": [
{
"value": "1",
"label": "1"
},
{
"value": "2",
"label": "2"
}
],
"default": "1"
},
{
"type": "header",
"content": "Product Card"
},
{
"type": "checkbox",
"id": "show_vendor",
"label": "Show Product Vendor",
"default": false
},
{
"type": "checkbox",
"id": "show_quick_view",
"label": "Enable Quick View",
"default": true
},
{
"type": "header",
"content": "Colors"
},
{
"type": "color",
"id": "bg_color",
"label": "Background Color",
"default": "#ffffff"
},
{
"type": "color",
"id": "text_color",
"label": "Text Color",
"default": "#000000"
},
{
"type": "header",
"content": "Spacing"
},
{
"type": "range",
"id": "padding_top",
"label": "Top Spacing",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"default": 40
},
{
"type": "range",
"id": "padding_bottom",
"label": "Bottom Spacing",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"default": 40
}
],
"blocks": [
{
"type": "featured_product",
"name": "Featured Product",
"settings": [
{
"type": "product",
"id": "product",
"label": "Product"
}
]
}
],
"presets": [
{
"name": "Product Grid",
"settings": {
"heading": "Featured Products",
"products_count": 4
}
}
]
}
{% endschema %}
{
"blocks": [
{
"type": "heading",
"name": "Heading",
"settings": [
{
"type": "text",
"id": "text",
"label": "Text",
"default": "Heading"
}
]
},
{
"type": "paragraph",
"name": "Paragraph",
"settings": [
{
"type": "richtext",
"id": "content",
"label": "Content"
}
]
}
],
"max_blocks": 10
}
{
"blocks": [
{
"type": "@theme"
}
]
}
{
"blocks": [
{
"type": "@app"
}
]
}
{
"presets": [
{
"name": "Hero Banner"
}
]
}
{
"presets": [
{
"name": "Product Grid",
"settings": {
"heading": "Featured Products",
"products_count": 4,
"columns_desktop": "4"
}
}
]
}
{
"presets": [
{
"name": "Testimonials",
"blocks": [
{
"type": "testimonial"
},
{
"type": "testimonial"
},
{
"type": "testimonial"
}
]
}
]
}
{
"settings": [
{
"type": "header",
"content": "Content Settings"
},
{
"type": "text",
"id": "heading",
"label": "Heading"
},
{
"type": "header",
"content": "Layout Settings"
},
{
"type": "select",
"id": "columns",
"label": "Columns"
}
]
}
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Default Heading" ← Always provide!
}
{
"type": "range",
"id": "products_count",
"label": "Number of Products",
"min": 2,
"max": 12,
"default": 4,
"info": "Maximum number of products to display from the selected collection"
}
text, textarea, number, rangecheckboxselect, radiocollection, product, image_pickercolor, color_background{
"type": "range",
"id": "padding",
"min": 0, ← Minimum value
"max": 100, ← Maximum value
"step": 4, ← Increment
"default": 40 ← Sensible default
}
{
"presets": [
{
"name": "Section Name",
"settings": {
"heading": "Default Heading",
"show_feature": true
},
"blocks": [
{
"type": "block_type"
}
]
}
]
}
Create schemas that make section customization intuitive and efficient for merchants.