{"repo":"wrabit/django-cotton","free":true,"listed":false,"github":"https://github.com/wrabit/django-cotton","clone":"git clone https://github.com/wrabit/django-cotton.git","description":"Enabling Modern UI Composition in Django","language":"Python","stars":1161,"topics":["django","components","ui"],"license":"MIT","category":"ui-components","readme_excerpt":"Django Cotton Bringing component-based design to Django templates. - Docs site + demos: django-cotton.com - Discord community (new) Contents Why? Install Usage Basics Your First component Attributes Named Slots Pass Template Variables Template expressions in attributes Boolean attributes Passing Python data types Increase Re-usability with {{ attrs }} Merging and Proxying Attributes with :attrs In-component Variables with Organizing in Subfolders HTMX Example Limitations in Django that Cotton overcomes Template Syntax Options Configuration Caching Tools Version support Changelog Comparison with other packages Why Cotton? Cotton aims to overcome certain limitations that exist in the django template system that hold us back when we want to apply modern practices to compose UIs in a modular and reusable way. Key Features - Modern UI Composition: Efficiently compose and reuse UI components. - Interoperable with Django: Cotton only enhances django's existing template system (no Jinja needed). - HTML-like Syntax: Native code editor syntax highlighting, code formatting and autoclosing (VS Code plugin for autocompletion). - Minimal Overhead: Compiles to native Django template tags with built-in compilation caching and automatic cache invalidation on file changes. - Encapsulates UI: Keep layout, design and interaction in one file (especially when paired with Tailwind and Alpine.js) - Compliments HTMX: Create reusable htmx components, render components directly from views. Install sett","default_branch":null,"files":null,"tree":[],"storefront":"/r/wrabit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wrabit/django-cotton/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}