Skip to main content
Blocks are repeatable items inside a section: buttons, menu links, FAQ entries, feature cards. Sellers add, remove, hide and reorder them in Visual.

Declaring blocks

schema.json
string
required
Block type, unique in the section.
string
required
Name shown in the editor.
number
Most blocks of this type in one section.
Setting[]
required
Same setting types as sections. See Section schema.
max_blocks on the section caps all block types together.

Blocks in templates

templates/index.json
A block with "disabled": true stays in the file but does not render.

Nested blocks

Set "nested_blocks": true on a section to let a block sit one level under another block. Menus with dropdowns are the common case. In Visual, drag a block to the right to nest it under the block above, and to the left to take it out. In the template, a child block names its parent’s id:
groups/header.json
Nesting is one level deep. A child whose parent is hidden, missing or itself nested does not render.

Reading nested blocks

Every block has parent (the parent’s id, or null at the top level) and children (its enabled child blocks, in order).
index.tsx
blocks still lists every enabled block, children included. Use rootBlocks (React, Vite) or root_blocks (Liquid) when you render a tree, so children are not drawn twice.