Config
settings_schema.json
Section titled “settings_schema.json”The theme settings merchants see under Theme settings in the visual editor, in groups. The theme’s name and version live in theme.json.
[ { "name": "Colors", "settings": [ { "type": "header", "content": "Scheme 1" }, { "type": "color", "id": "scheme_1_background", "label": "Background", "default": "#FBF8F3" }, { "type": "color", "id": "scheme_1_text", "label": "Text", "default": "#1C1917" } ] }, { "name": "Cart", "settings": [ { "type": "select", "id": "cart_type", "label": "Cart type", "default": "drawer", "options": [{ "value": "drawer", "label": "Drawer" }, { "value": "page", "label": "Page" }] } ] }]Read the values anywhere as settings.<id>: {{ settings.cart_type }}. Setting IDs are unique across the whole file. A group can set "capability" to show only while a store feature is on.
settings_data.json
Section titled “settings_data.json”The current values, written by the visual editor, and named presets:
{ "current": "Default", "presets": { "Default": { "scheme_1_background": "#FBF8F3", "cart_type": "drawer" }, "Night": { "scheme_1_background": "#121212", "scheme_1_text": "#F5F5F4" } }}current is a preset name, or an object of values once the merchant changes something. Presets are the theme’s styles: merchants choose one in Theme settings and start from it. A setting without a value takes its default from the schema.
The theme check refuses a current that names a preset that doesn’t exist, and values that don’t fit their setting (a number out of range, an unknown select option).
Was this page helpful?

