{% schema %} and {% endschema %} in a section or standalone block.
Define a section schema
A section schema can use these top-level fields:
Use either
enabled_on or disabled_on to constrain placement:
Define a setting
Every setting needs a supportedtype.
Every value-producing setting needs a unique, non-empty id within its settings array.
Use the ID to read the saved value:
Keep IDs stable after a theme ships.
Changing an ID disconnects the schema from existing saved values.
Choose a setting type
Use the following value controls in section and block schemas. Where an alias is shown, use one spelling consistently within a theme.Text and URL
Numbers and choices
A range should define its bounds and increment:
label and value for each explicit select or radio choice:
Visual and media
Layout
Composite controls can return structured values.
Inspect the selected value before you interpolate one directly into CSS.
Organization
Useheader to divide a long settings panel:
Resource selectors
Fluid resolves the following setting types into Liquid resource values:
The saved identifier resolves to a resource value before Liquid reads the setting:
product_list when the editor should choose several products.
Iterate the resolved value:
Define inline blocks
Inline blocks belong to one section. A block definition needstype and name when it defines settings.
section.blocks:
type.
Use @theme to accept public standalone blocks and @app to accept compatible extension blocks.
See blocks and components for rendering and nesting patterns.
Add presets
A preset can provide a displayname, picker category, initial settings, and initial blocks.
Reuse option groups
Use an option group when several section or block settings should share a choice list defined by the root theme. This keeps choices such as type scales consistent across the editor. First, addoption_group metadata to settings in config/settings_schema.json:
option_group.id contributes one choice.
The editor uses option_group.label as the choice label and option_group.value as its saved value.
Duplicate values are collapsed to the first matching choice.
Then set options to the plain option-group ID:
_, and - in an option-group ID.
If the group is missing or malformed, the editor cannot resolve choices for the setting.
An explicit options array continues to work and takes precedence over option-group resolution.
See root theme configuration for the rest of the settings flow.
Validate before publishing
Before you publish a schema:- Confirm that the schema body is valid JSON.
- Give each value-producing setting a unique, non-empty ID.
- Use only supported setting types.
- Define block
settingsas an array. - Give inline blocks a
name. - Confirm that preset values match declared IDs and block types.
- Confirm that named standalone blocks exist.
- Test default and edited values in the visual editor.
fluid theme lint --json to catch schema and reference problems before you push.
See the CLI guide for the complete local workflow.