settings_schema.json

The settings_schema.json file controls the organization and content of the Theme settings area of the theme editor. All setting selections in the theme editor are saved in the settings_data.json.

Location

The settings_schema.json file is located in the config directory of the theme:

└── theme
    ...
    ├── config
        ├── settings_data.json
        ├── settings_presets.json
        └── settings_schema.json
    └── locales

Schema

The settings_schema.json file is an array of objects that represent setting categories. Each object needs to have the following attributes:

AttributeDescriptionRequired
nameThe name of the category of settings.Yes
settingsAn array of associated settings.Yes

The settings_schema.json file should follow the following basic format:

[
  {
    "name": {
      "en-US": "Colors",
      "zh-CN": "颜色"
    },
    "settings": [
      ...
    ]
  },
  ...
]

The settings_schema.json file is a JSON file, so all content must be valid JSON. Additionally, make sure you follow the appropriate syntax for your desired setting.

Usage

When working with the settings_schema.json file, 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 app users.
Sidebar settingsSettings that can’t hold a value, and aren’t configurable by app users. They’re informational elements that can be used to provide detail and clarity for your input settings.

Access settings

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