Named slots for the `{% block %}` tag

Short description of issue

{% block %} only supports a single, unnamed content area — no way to pass multiple named regions (e.g. header/content/footer)

Reproduction steps

Today {% block %} supports exactly one content region via body content:

{% block 'container' %}
  <h1>Welcome</h1>
{% endblock %}

read in the block file as {{ block.content }}. There’s no way to pass a second or third distinct region without falling back to string/HTML params, which defeats the purpose of body-content slots.

Additional info

Our container snippet — the standard section wrapper used across the whole theme — needs three regions: header, main content, and footer:

{%- render 'container',
  header_content: header_html,
  content: main_html,
  footer_content: footer_html
-%}

Proposing a dedicated {% slot %} tag so this could be expressed natively as a block:

{% block 'container' %}
  {% slot 'header' %}
    <h2>{{ section.settings.title }}</h2>
  {% endslot %}

  <p>Main body content — the default/unnamed slot.</p>

  {% slot 'footer' %}
    {% render 'button', title: 'See all' %}
  {% endslot %}
{% endblock %}

with the block file reading {{ block.content }} for the default slot and {{ block.slots.header }} / {{ block.slots.footer }} for named ones — mirroring Vue’s <template #header> pattern. Multi-region components (cards, modals, accordions, containers) are common enough that this seems worth raising while the tag is still in developer preview.

What type of topic is this

Feature request

I favor this as well, and resemble a lot a proposal I did a few years ago.

Thanks for raising this! Agree! We discussed it before but weren’t sure if it was necessary so left it out to start with, but glad to hear there is enthusiasm. Consider it on the roadmap.