Configuration flow
1
Declare the setting
Add the control to
config/settings_schema.json.2
Store the selected value
Add the initial value to
config/settings_data.json.3
Expose a CSS variable
Read the setting in
layouts/theme.liquid and assign it to a CSS custom property.4
Use the variable
Reference the custom property from global styles, components, or sections.
5
Test in the editor
Change the setting, preview representative templates, and check responsive states.
Declare settings
Group settings by the job they do. Give each setting a stable ID and a realistic default:Seed stored values
Use the same ID inconfig/settings_data.json:
Map settings to CSS variables
Expose design settings once in the layout:Use settings in a section
Use a local section setting for content-specific choices and a global setting for system-wide design:Work across Base, Vox, and Fluid
Do not assume that similarly named tokens have identical defaults across the three root themes. When you port a section:- Identify the design role, such as primary color or heading size.
- Find the equivalent setting in the destination theme.
- Update the mapping at the layout boundary.
- Keep the section pointed at a stable CSS variable.
- Compare the section in every supported breakpoint.
Add a setting safely
Before you publish:- Use a unique, descriptive setting ID.
- Provide a default in both configuration files.
- Add the CSS-variable mapping when editor content should link to the value.
- Check existing sections for a conflicting variable name.
- Test the default and a non-default value.
- Test Base, Vox, or Fluid specifically rather than assuming their defaults match.
Troubleshoot configuration
If a setting is missing from the editor, validate the schema structure and confirm the setting belongs to a visible group. If a saved value has no effect, confirm that:settings_data.jsonuses the same ID assettings_schema.json.theme.liquidreads that ID.- The CSS variable is declared before it is used.
- A more specific selector does not override the value.
- The section reads the intended global or local setting.