Config files define settings in the Theme settings area of the theme editor, as well as store their values.

Theme settings are a good place to host general settings such as typography and color options. Theme settings can be accessed through the settings object.

📘

Tip

You can also create settings for sections and blocks. These settings are defined as part of the parent section or block object, and appear in the theme editor with the associated object.


Location

Config files are located in the config directory of the theme:

└── theme
    ...
    ├── config
    |   └── settings_schema.json
    |   ├── settings_data.json
    |   └── settings_schema.json

Subtypes

There are three config files, each with their own schema and content:

TypeDescriptionRequired
settings_schema.jsonControls the organization and content of the Theme settings area of the theme editor.Yes
settings_data.jsonContains the saved values from the settings in settings_schema.json.Yes
settings_presets.jsonContains an object for each theme style. Each object is in the same format as current as defined in settings_data.json.Yes

Usage

When working with config files, you should familiarize yourself with the following:

Setting types

There are two categories of settings:

CategoryDescription
Input settingsSettings that can hold a value, and are configurable by merchants.
Input settingsSettings that can’t hold a value, and aren’t configurable by merchants. They’re informational elements that can be used to provide detail and clarity for your input settings.

Access settings

Theme settings can be accessed through the settings object. To learn more about the syntax and considerations, refer to Access settings.


Theme metadata

You can add theme metadata to the Theme actions menu of the theme editor. This includes information like the theme name and version, where to find theme documentation, and theme developer contact details. To learn how to include this information in your theme, refer to Add theme metadata.