# Keep Section Schema Lean

Only expose settings that editors actually need. Large schemas slow the theme editor.

```json
{% comment %} BAD: excessive settings {% endcomment %}
{% schema %}
{
  "settings": [
    { "type": "text", "id": "title", "label": "Title" },
    { "type": "text", "id": "title_tag", "label": "Title HTML tag" },
    { "type": "text", "id": "title_class", "label": "Title CSS class" },
    { "type": "text", "id": "title_style", "label": "Title inline style" }
  ]
}
{% endschema %}

{% comment %} GOOD: only what editors control {% endcomment %}
{% schema %}
{
  "settings": [
    { "type": "text", "id": "title", "label": "Title" },
    {
      "type": "select", "id": "title_size", "label": "Title size",
      "options": [
        { "value": "sm", "label": "Small" },
        { "value": "lg", "label": "Large" }
      ],
      "default": "lg"
    }
  ]
}
{% endschema %}
```

Map setting values to Tailwind classes in the template, not in the schema.

## image_picker Includes Alt Text

Never add a separate text setting for alt text when using `image_picker`. The picker stores alt text on the image object itself.

```json
{% comment %} BAD: redundant alt text setting {% endcomment %}
{% schema %}
{
  "settings": [
    { "type": "image_picker", "id": "image", "label": "Image" },
    { "type": "text", "id": "image_alt", "label": "Image alt text" }
  ]
}
{% endschema %}

{% comment %} GOOD: use the image object's built-in alt {% endcomment %}
{% schema %}
{
  "settings": [
    { "type": "image_picker", "id": "image", "label": "Image" }
  ]
}
{% endschema %}
```

Access alt text via `{{ section.settings.image.alt }}` in the template.

## Conditional Visibility with `visible_if`

Use `visible_if` to hide settings that don't apply to the current configuration. This keeps the editor clean and avoids confusion.

```json
{
  "type": "select",
  "id": "layout",
  "label": "Layout",
  "options": [
    { "value": "single", "label": "Single" },
    { "value": "diptych", "label": "Diptych" }
  ],
  "default": "single"
},
{
  "type": "image_picker",
  "id": "background_image",
  "label": "Background Image",
  "visible_if": "{{ section.settings.layout == 'single' }}"
}
```

Works on any setting type including `header`. Accepts Liquid expressions that evaluate to truthy/falsy.
