{% extends "django_sample_components/pages/master_async.html" %} {% load async_tags %} {% block title %}Async Counter{% endblock %} {% block content %}

Async Counter with HTMX

Interactive counter component that updates without page reload.


Basic Counter

Starts at 0, increments/decrements by 1:

{% async_counter initial_value=0 step=1 %}
Counter with Step 5

Starts at 0, increments/decrements by 5:

{% async_counter initial_value=0 step=5 %}

Counter with Initial Value

Starts at 10, increments/decrements by 1:

{% async_counter initial_value=10 step=1 %}
Counter with Min/Max

Starts at 5, with limits 0-10, step 1:

{% async_counter initial_value=5 step=1 min_value=0 max_value=10 %}

How It Works
{% endblock %}