Skip to content

v0.90 (2024-08-18)ยค

__

Featยค

  • All tags (component, slot, fill, ...) now support "self-closing" or "inline" form, where you can omit the closing tag:

    {# Before #}
    {% component "button" %}{% endcomponent %}
    {# After #}
    {% component "button" / %}
    
  • All tags now support the "dictionary key" or "aggregate" syntax (kwarg:key=val):

    {% component "button" attrs:class="hidden" %}
    
  • You can change how the components are written in the template with TagFormatter.

    The default is django_components.component_formatter:

    {% component "button" href="..." disabled %}
        Click me!
    {% endcomponent %}
    

    While django_components.component_shorthand_formatter allows you to write components like so:

    {% button href="..." disabled %}
        Click me!
    {% endbutton %}