Settings System
Define configurable options for themes and sections. The same setting types are used in both contexts, but how initial values are defined differs.
Theme settings use "default" on each setting for initial values.
Section settings never use "default" -- all initial values live in presets. The validator will reject section schemas that contain "default" fields.
Section Schema Structure
Each section ends with a {% schema %} block containing settings, blocks, and presets:
{% schema %}
{
"name": "Section Name",
"category": "cta",
"tag": "section",
"settings": [...],
"blocks": [...],
"presets": [
{
"name": "Default",
"settings": {
"title": "Hello World",
"bgcolor": "",
"show_date": true
}
}
]
}
{% endschema %}
Presets are the single source of truth. When a section is added to a page, the first preset's values are used as the initial settings. Every non-display setting must have a corresponding entry in the preset.
Theme Settings Schema
Theme-level settings live in config/settings_schema.json. Unlike sections, theme settings use "default" directly on each setting:
{
"name": "Colors",
"settings": [
{
"type": "color",
"id": "primary_color",
"label": "Primary Color",
"default": "#3B82F6"
},
{
"type": "color",
"id": "text_color",
"label": "Text Color",
"default": "#1F2937"
}
]
}
The stored values go into config/settings_data.json. The "default" in the schema is the initial/fallback value.
Setting Types
All types below work in both section and theme settings. Examples show the setting definition only -- remember that for sections, initial values go in presets, not "default".
Display-Only Types
These types don't store values -- they organize and explain settings in the admin UI.
header
Section divider with label text.
{
"type": "header",
"content": "Text Colors"
}
info
Informational text box with helpful context.
{
"type": "info",
"content": "Used when sections have 'Light Text' enabled (for dark backgrounds)"
}
text
Simple text input or textarea.
{
"type": "text",
"id": "title",
"label": "Title",
"nb_rows": 1
}
| Option | Description |
|---|---|
nb_rows | 1 = input, 2+ = textarea |
html | true = rich text editor (Trix) |
line_break | Allow line breaks |
Live Preview -- Use .attr accessor:
<h2 {{ section.settings.title.attr }}>{{ section.settings.title }}</h2>
color
Color picker (no transparency).
{
"type": "color",
"id": "bgcolor",
"label": "Background Color"
}
Live Preview -- Use CSS variables:
{% capture section_style %}--bgcolor: {{ section.settings.bgcolor }};{% endcapture %}
{% section_wrapper 'section' style: section_style data-css-vars: 'bgcolor' %}
<div style="background-color: var(--bgcolor);">
color_alpha
Color picker with transparency.
{
"type": "color_alpha",
"id": "overlay_color",
"label": "Overlay Color"
}
Value format: {"color": "#RRGGBB", "alpha": 0-100}
Liquid Filter:
{{ section.settings.overlay_color | color_alpha_to_rgba }}
<!-- Output: rgba(31, 41, 55, 0.80) -->
image
Image picker from asset library.
{
"type": "image",
"id": "background_image",
"label": "Background Image"
}
Liquid Filter -- Use image_url with size:
<img src="{{ section.settings.background_image | image_url: 'large' }}">
Sizes: thumb, small, medium, large, hero
link
Link with text, URL, and optional target.
{
"type": "link",
"id": "button",
"label": "Button",
"with_text": true
}
Usage -- Access properties directly:
<a href="{{ section.settings.button.href }}"
target="{{ section.settings.button.target }}">
{{ section.settings.button.text }}
</a>
| Property | Description |
|---|---|
.text | Link display text |
.href | URL (also available as .url) |
.target | "" or "_blank" for new tab |