A section is a full-width content area that merchants can add to any page template from the theme editor. Sections act as containers — they hold blocks, control the overall layout, and expose their own settings for things like spacing, background color, and visibility.
Every page in a Slab-powered store is built from sections stacked vertically. The built-in Section type covers most layouts, but custom sections let you build entirely new content areas with their own block types and configuration options.
Sections are the right choice when you need:
Section type.If you only need a small piece of dynamic or interactive content within an existing section, custom liquid or a custom block is simpler.
A section file lives in the sections/ folder (compiled from src/sections/ if you are using the development toolkit) and follows this pattern:
{{ section.shopify_attributes }} on the root element (required for the theme editor){% content_for 'blocks' %} inside the layout{% schema %} — JSON defining the section's name, accepted block types, settings, and presetsAccepted block types are declared in the schema's "blocks" array. Use { "type": "@theme" } to accept all theme blocks, { "type": "@app" } for app blocks, or list specific block types to restrict what merchants can add.
The Slab repo includes the shopify-liquid-themes agent skill, which knows the full section structure, schema conventions, and Slab's Tailwind and Alpine.js patterns. Open your coding agent (e.g. Cursor) in the Slab repo and prompt:
Using the shopify-liquid-themes skill, create a new section called [your section name]. It should [describe the layout and what it contains, e.g. "display a two-column layout with a heading and body text on the left and an image on the right, with settings for spacing and background color"].
The agent will generate a complete section file with correct schema JSON, Tailwind utility classes, and {% content_for 'blocks' %} for the dynamic block area.
Example — a testimonials section with configurable quote blocks:
Using the shopify-liquid-themes skill, create a new section called testimonials. It should display a heading above a grid of quote blocks. Include a setting for the number of columns (2, 3, or 4). Accept only a custom testimonial block type that has settings for the quote text, author name, and author title.
Once the file is generated, place it in the sections/ folder. The section will appear in the theme editor's Add section picker under its preset category.
Start by connecting your source repository and choosing the pages you want to publish.
You can then browse your documentation and ask questions about the content your team has shared.