{% comment %} Display surface for the {% show_code %} tag. Receives: rendered – the live, compiled component (safe HTML) code – escaped Cotton source for the "Cotton" tab html – escaped, prettified HTML output for the "HTML" tab Rendered via render_to_string(), so plain Django + Alpine only (no c- tags), which keeps it safe to use while documenting the components themselves. {% endcomment %}
{# Live preview #}
{{ rendered }}
{# Tab bar #}
{# Code panels #}
{{ code }}