Blocks are smaller pieces placed inside sections. Upstorr supports two kinds.
Reusable blocks
Store a visible piece used by several sections under:
theme/blocks/shared/<type>.liquid
theme/blocks/retail/<type>.liquid
The file owns the block's Liquid markup, CSS and schema. The compiler discovers the filename automatically. There is no React registry and no Casa-specific rendering code outside the theme.
Examples include button, text, image, product card, price and quantity blocks.
Declare reusable children in the parent Liquid schema:
"reusable_blocks": [{ "type": "group" }, { "type": "button" }]
Each type must have its own block file. A group declares its own accepted children; permission on a section does not grant permission to every descendant. The compiler checks template and section-group trees against these declarations. Use <theme-slot name="blocks"></theme-slot> in a section and <theme-slot name="children"></theme-slot> in a reusable group.
For example, three editable steps are three group blocks. Each group contains separate number/text, heading and description blocks. The Starter welcome section demonstrates this complete tree. Declare the installed tree in template JSON using blocks and block_order; reusable_blocks belongs only in the Liquid schema.
New CLI projects include AGENTS.md, DESIGN.md and .agents/skills/upstorr-themes/SKILL.md for coding assistants. Read those instructions before changing theme structure.
Section-local blocks
Declare a local block in the parent section schema when it makes sense only inside that section. Its design remains in the main section file. The inner block does not receive a separate code editor.
Nesting and locks
The schema declares which child block types each parent accepts and an optional maximum. Preset trees must follow those same rules. Block trees support at most eight nested levels, 200 installed blocks and 500 blocks across one schema's preset trees.
A static local block fixes an important position. It must declare its ID and type and set static: true, removable: false, reorderable: false and duplicatable: false. Keep those identities unchanged when editing the section.
Every installed block ID must be unique within its section, including descendants. Use names such as step-edit-heading and step-preview-heading; repeating heading in different child groups makes editor selection ambiguous.