- Components are Liquid partials that accept values when you render them.
- Inline blocks are configurable items defined and rendered by one section.
- Standalone theme blocks package markup and schema for reuse across sections.
Use a component
Create a component when you want to reuse markup without adding an editor-controlled item. Components do not have their own schema. Store each component in its own directory:Use an inline block
Use an inline block when an item belongs to one section. Define its schema inside the section and render it fromsection.blocks.
{{ block.fluid_attributes }} to the block’s outer element.
The editor uses these attributes to identify the selected item.
Use a standalone theme block
Use a standalone theme block when several sections need the same configurable item. A standalone block owns both its Liquid markup and its schema. Store blocks underblocks/:
blocks/heading/index.liquid can contain:
content_for:
content_for 'blocks' renders each block through its own template.
Do not also loop over section.blocks to render the same standalone blocks.
Control which blocks a section accepts
Add{"type": "@theme"} to accept every public standalone block in the theme.
Reference a block by name when the section should accept only selected block types:
type without an inline name or settings definition.
Fluid reads the matching standalone block’s schema.
You can combine public blocks, named references, and inline blocks:
Keep a standalone block private
Prefix a standalone block name with_ to exclude it from @theme.
Reference the private block by its exact name in sections that need it:
Nest standalone blocks
A standalone block can accept child blocks. Inside its template,content_for 'blocks' renders the current block’s children.
Render a fixed block
Use the singularcontent_for 'block' form for a block that belongs in a fixed position:
closest namespace:
closest.product.
This pattern is useful when the surrounding section controls the resource but the block controls its presentation.
Add presets
Presets provide initial settings and blocks when an editor adds a section or standalone block. They can also expose multiple configured variants in the picker.Compare the options
Use a component for rendering concerns.
Use a block for editor-owned content.
A standalone block can render a component when you need both behaviors.
See schema components for setting types and schema rules.
See the developer guide for the complete theme structure.