wrabit/django-cotton
Enabling Modern UI Composition in Django observed · 2026-08-28
Health v2 · maintenance only
84/100
- Activity 94
- Release rhythm 86
- Longevity 58
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 3
- age_days: 816
- days_rel: 93
- days_push: 41
- n_releases_24m: 50
Adoption not part of the score
1163 stars · 61 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Django Cotton is a Python library that brings component-based UI composition to Django templates, letting developers define reusable components in single template files and use them with HTML-like tags or native Django template tags. It compiles to native Django template tags with caching, supports slots, attributes, and vars, and pairs well with Tailwind CSS, Alpine.js, and HTMX.
Use cases
- build reusable UI components in Django templates
- replace repetitive {% include %} snippets with components
- create consistent form input components across a Django app
- compose page layouts with slots and variants
- build reusable HTMX components rendered from views
- use React-style components without leaving Django templates
When to choose
- you use Django's template engine and want modern component-based UI composition
- you want reusable components without Jinja, a build step, or a JS frontend framework
- you pair Django with Tailwind CSS, Alpine.js, or HTMX and want encapsulated UI files
When to avoid
- your project uses Jinja2 instead of Django's template language
- you need a full client-side component framework like React or Vue
- you only need simple one-off template includes
Facets
library · maturity active
ui-components templating frontend-framework web-development frontend developer-tools python django components slots htmx tailwind alpinejs template-tags web-server
10 sources
- readme: https://github.com/wrabit/django-cotton · fetched 2026-08-28 · 2f383770a983
- homepage: https://django-cotton.com · fetched 2026-08-29 · bf9647ca4512
- site_page: https://django-cotton.com/docs/quickstart · fetched 2026-08-29 · 6bd4c3b33270
- site_page: https://django-cotton.com/docs/components · fetched 2026-08-29 · 3667aa3c31b0
- site_page: https://django-cotton.com/docs/fundamentals · fetched 2026-08-29 · c09123c0db90
- site_page: https://django-cotton.com/docs/configuration · fetched 2026-08-29 · ee2f1ad05907
- site_page: https://django-cotton.com/docs/thinking-in-components · fetched 2026-08-29 · ff7bb43bc9cd
- site_page: https://django-cotton.com/docs/form-fields · fetched 2026-08-29 · d43a2f47f39a
- site_page: https://django-cotton.com/docs/alpine-js · fetched 2026-08-29 · d19b5d1a8e16
- site_page: https://django-cotton.com/docs/layouts · fetched 2026-08-29 · fe061443f585
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| wrabit/django-cotton | main | 84 |
For agents
markdown · JSON · MCP: product_card(name="wrabit/django-cotton")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem