{# @description A titled section: heading with icon at a chosen level, an actions row, then body content. #} {# @prop title:text | description:"Section heading text; the heading row is omitted entirely when neither this nor actions is given." #} {# @prop icon:text | description:"Icon shown beside the heading." #} {# @prop level:select['1','2','3','4'] | default:"2" | description:"Heading level, 1 to 4." #} {# @prop actions:text | hidden | description:"Filled by the actions named slot; not passed as a plain attribute." #} {# @slot Section body content. #} {# @slot:actions — Content rendered at the end of the heading row. #}
{% if title or actions %} {% if title %} {# djlint:off #} {% if icon %}{% endif %} {{ title }} {# djlint:on #} {% endif %} {{ actions }} {% endif %} {{ slot }}