Block schema

Theme blocks support the {% schema %} Liquid tag. This tag is used to define the following block attributes and settings:

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:

Each block can have only a single {% schema %} tag, which must contain only valid JSON and can only use the attributes listed below. The schema tag can be placed anywhere within the block file, but it can’t be nested inside another Liquid tag. It doesn’t output its contents, or render any Liquid included inside it.