Theme blocks support the `{% schema %}` Liquid tag. This tag is used to define the following block attributes and settings: - [`name`](#name) - [`settings`](#settings) - [`blocks`](#blocks) - [`presets`](#presets) - [`tag`](#tag) - [`class`](#class) These attributes and settings enable different customization options and preconfigurations of the block inside the theme editor. The following is an example of a block schema that opts-in to supporting nested blocks with its `block` attribute, defines some background-related `settings`, and assembles different variations of those settings with its `presets` attribute:
Attribute | Description | Required |
---|---|---|
name
|
The preset name, which displays in the theme editor's Add section picker. | Yes |
settings
|
A list of default values for any settings that you might want to populate. Each entry should include the setting name and the value. | No |
blocks
|
A list of child blocks that you might want to include. Each entry should be an object with attributes of type and settings . The type attribute value should reflect the type of the block that you want to include, and the settings object should be in the same format as the settings attribute above.
|
No |