visible_if is an attribute on a setting in a Shopify theme’s schema. It holds one Liquid expression wrapped in {{ }}, and the theme editor shows the setting only while that expression is true. The expression can read other settings and nothing else. A hidden setting keeps its stored value, so your Liquid should test the same condition.
Shopify announced it on 21 May 2025, and the documentation is still one short section of the settings page. Most of what follows comes from running Theme Check (Shopify CLI 5.1.0, November 2026) against a scratch theme and reading what it reported. None of it was tried in a live theme editor, and each place where that matters says so.
How does Shopify visible_if work in a section schema?
Take a promo banner. The image picker only makes sense when the layout has an image, and the two button fields only when the button is switched on.
<div class="promo promo--{{ section.settings.layout }}">
{%- if section.settings.layout != 'text_only' and section.settings.image != blank -%}
{{ section.settings.image | image_url: width: 1200 | image_tag: loading: 'lazy' }}
{%- endif -%}
<h2>{{ section.settings.heading | escape }}</h2>
{%- if section.settings.show_button and section.settings.button_link != blank -%}
<a class="button" href="{{ section.settings.button_link }}">
{{- section.settings.button_label | escape -}}
</a>
{%- endif -%}
</div>
{% schema %}
{
"name": "Promo banner",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "New in this week"
},
{
"type": "select",
"id": "layout",
"label": "Layout",
"default": "image_left",
"options": [
{ "value": "image_left", "label": "Image left" },
{ "value": "image_right", "label": "Image right" },
{ "value": "text_only", "label": "Text only" }
]
},
{
"type": "image_picker",
"id": "image",
"label": "Image",
"visible_if": "{{ section.settings.layout != 'text_only' }}"
},
{
"type": "checkbox",
"id": "show_button",
"label": "Show a button",
"default": false
},
{
"type": "text",
"id": "button_label",
"label": "Button label",
"default": "Shop now",
"visible_if": "{{ section.settings.show_button }}"
},
{
"type": "url",
"id": "button_link",
"label": "Button link",
"visible_if": "{{ section.settings.show_button }}"
}
],
"presets": [{ "name": "Promo banner" }]
}
{% endschema %}
Three settings carry a condition. The select is compared with one of its option values. The checkbox is used bare, because it is already true or false. Each expression names the setting by its full path, section.settings.layout, the same way the markup above the schema does.
The markup repeats both conditions, because Shopify’s changelog says a hidden setting keeps its data.
Which setting types can be hidden?
The docs list them. Every basic input setting qualifies (checkbox, number, radio, range, select, text, textarea), as do both sidebar settings, header and paragraph. Among the specialised input settings the supported ones are color, color_background, color_scheme, font_picker, html, image_picker, inline_richtext, link_list, liquid, richtext, text_alignment, url, video and video_url.
Missing from that list is every resource picker: article, blog, collection, page, product, metaobject and the four _list types. color_palette and color_scheme_group are missing too. Put visible_if on a product setting in a section and Theme Check reports Property visible_if is not allowed. under its ValidSchema check. A collection setting in config/settings_schema.json got the same message under ValidJSON.
Because header is on the list, a heading can be hidden along with the group it labels, so it is not left behind with nothing beneath it.
What can the expression read?
Only settings, each by its full path. Which paths Theme Check accepts depends on the file. In a section’s settings they are section.settings.<id> and the global settings.<id> from config/settings_schema.json. In a theme block file under blocks/ they are block.settings.<id>, settings.<id> and section.settings.<id>, although the last is never verified, because the check cannot know which section the block will sit in. In config/settings_schema.json only settings.<id> is accepted.
The example on the settings page uses block.settings.layout_style, which is right in a block file. Paste it into a section’s own settings and Theme Check answers Invalid visible_if: can't refer to "block" when not in a block file.
Nothing about the page being rendered is available. The docs put it this way: “Conditional settings cannot access runtime context or resolved data source values.” You can test whether a setting connected to a dynamic source has a value, not what that source resolves to. In the scratch theme, {{ product.available }} and {{ request.design_mode }} both failed, with Invalid variable: "product" was not found. and the same message naming request.
The docs show one operator, ==. Shopify’s own Horizon theme (version 4.5.0) shows more. Its schemas compare with ==, != and >, test != blank, use checkboxes bare, and chain and with or, as in this line from its hero section:
"visible_if": "{{ section.settings.toggle_overlay and section.settings.overlay_style == 'gradient' }}"
Theme Check rejected three forms with Syntax error: cannot parse visible_if expression.: a filter ({{ section.settings.heading | size > 0 }}), parentheses, and not. For the opposite of a checkbox, {{ section.settings.show_button == false }} passes.
With no parentheses, grouping falls to Liquid’s rule that operators are evaluated from right to left. The conditional settings section does not say whether the editor follows the same order, so a condition that mixes and with or deserves a click-through in the editor before it ships.
What does Theme Check catch, and what does it miss?
Theme Check runs a check called ValidVisibleIf by default, at error severity, so one offence makes the command exit with code 1. On 29 November 2026 it was not in the checks reference, so these are its messages as the CLI printed them.
shopify theme check --path .
| In the schema | Reported |
|---|---|
"section.settings.layout == 'a'" | Invalid visible_if expression. It should take the form "{{ <expression> }}". |
"{{ section.settings.layuot == 'a' }}" | Invalid variable: "section.settings.layuot" was not found. |
"{{ 1 == 1 }}" | visible_if expression contains no references to any settings. This is likely an error. |
"visible_if": true | Incorrect type. Expected "string". (from ValidSchema) |
So a misspelt setting id is caught. A misspelt option value is not: {{ section.settings.layout != 'text-only' }}, with a hyphen where the option has an underscore, passed without an offence. The check resolves the names in the expression and does not compare string literals with the options they are meant to match.
The larger gap is section blocks. The check reads the top-level settings array of a section or block file, plus the global schema. It does not read the settings of blocks declared inside a section’s own blocks array. In a scratch section, one local block setting pointed at an id that did not exist and another had the plain text not liquid at all as its visible_if. Neither was reported. The check’s source shows why: it loops over the schema’s own settings and goes no deeper. If a theme still relies on section blocks (our comparison of theme blocks and section blocks covers the difference), conditions on their settings need checking by hand in the editor.
The docs do not say what the editor does with an expression it cannot evaluate, and no broken expression was pushed to a store to find out. Theme Check reports a malformed one first, except in the section-block case, and our guide to running Theme Check in CI has the setup.
Does a hidden setting still affect the storefront?
The changelog says the attribute hides settings “while still preserving their data”. A merchant picks an image, switches the layout to text only, and the image picker leaves the sidebar. By that account, the image they picked is still stored.
Nothing in the settings docs says a hidden setting comes back blank in Liquid, and this was not tested in an editor. The safe reading is that section.settings.image still returns the image, which is why the banner’s markup tests layout != 'text_only' before printing it and show_button before printing the link. Rendered locally with LiquidJS and stand-in image filters, the guarded markup printed no image for a text-only banner that still had one stored. With the guard removed, it printed the image.
The cost is that each condition now lives in two places, the schema and the markup, and Theme Check compares neither with the other. Rename an option value and both have to change.
What we would do
Use visible_if for the dependents of a toggle or a select: the fields that mean nothing until another setting is in a particular state. Keep each expression to one or two terms. Guard the markup with the same condition, run Theme Check on every push, and click through any condition that sits on a section block or mixes and with or.
We would not use it to fold two different sections into one, with one set of settings for a grid and another for a carousel. Those are two sections, or one section with blocks. Nor would we rely on it to switch anything off, since per the changelog a hidden setting keeps its data.
We build and customise Shopify themes, section and block schemas included. That work is described on our Shopify development page.