Cotton/HTMX/AlpineJS Django components in the style of shadcn/ui
Project description
chad/ui
Beautifully designed components based on the Cotton/HTMX/Alpine.js stack for Django.
What is chad/ui?
chad/ui is a collection of re-usable components that you can copy and paste into your Django apps.
Inspired by shadcn/ui, chad/ui builds on shadcn-django's great foundation and faithful port of shadcn/ui to Django. It's a slightly different & opinionated flavor with:
- 🧩 Additional components - File upload, filter, radio group, spinner, and more.
- 🔌 Third-party integrations - AG Grid, TradingView widgets, etc.
- 🛠️ Backend integration - Seamless async data fetching, client-side validation, and more, via HTMX.
- 📱 Enhanced patterns & design - Radix-aligned composition & APIs, improved responsiveness and mobile interactivity, and visual feedback during async requests.
If you want the core, basic shadcn/ui experience in Django, use shadcn-django. If you would like these additional features and enhancements, use chad/ui.
Why chad/ui?
- Own your code - Components live in your project, not hidden in a package
- Customize everything - Change the code however you want since you own it
- Django-native - Built using standard django template language and django-cotton for re-usability and progressive enhancement
- Interactive without JavaScript fatigue - HTMX for server interactions, Alpine.js for client-side reactivity
- Adapt to your setup - Compatible with HTMX and Alpine.js as CDN links or as an npm modules
- Tailwind for styling - Utility-first CSS that's easy to customize
Getting Started
If you already have Django configured with django-cotton, HTMX, Alpine.js, and TailwindCSS, you are ready to go.
Else, please see Install Dependencies.
Add Components
The easiest way to interact with chad/ui components is via the CLI using pipx or uvx:
pipx run chad-ui -h
uvx chad-ui -- -h
To view an index of all available components:
pipx run chad-ui index
To add a component:
pipx run chad-ui add <component>
Install Dependencies
1. django-cotton
Please see the django-cotton installation instructions.
2. HTMX
See the HTMX installation docs for the full documentation.
Option A - CDN:
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"></script>
Option B - Download: Download htmx.min.js to your static files and reference via script tag.
Option C - npm:
npm install htmx.org@2.0.8
Use in your bundle (e.g., index.js):
import 'htmx.org';
For global htmx variable access (recommended):
window.htmx = require('htmx.org');
3. AlpineJS
See the Alpine.js installation docs for the full documentation.
Option A - CDN:
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
Option B - npm:
npm install alpinejs
Add to your JS bundle:
import Alpine from 'alpinejs'
window.Alpine = Alpine
Alpine.start()
4. Tailwind CSS
See the Tailwind CSS docs for the full documentation.
Option A - CDN (Development):
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
Option B - Tailwind CLI (Production):
npm install -D tailwindcss
npx tailwindcss init
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chad_ui-0.0.7.tar.gz.
File metadata
- Download URL: chad_ui-0.0.7.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e095eea2b3746904a9736207d98a46f1a0dfd068542bfff03753ebaf17b5c634
|
|
| MD5 |
e7ae6a1952de7dd704b3f74fa346ac19
|
|
| BLAKE2b-256 |
08f3ece3e9f2c5723c8e682b7a6cb94ad1402c4546612dd56dd515bc7ba200c5
|
File details
Details for the file chad_ui-0.0.7-py3-none-any.whl.
File metadata
- Download URL: chad_ui-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f389148d0e1bf3bf668baff8a98c23cb41489d1e3e7c9aacec06d2fa9e3bfe
|
|
| MD5 |
ac19aedc3f3ad7fd01a4c63d501eec53
|
|
| BLAKE2b-256 |
86c8b2690d3c229509232387e54afac02fbc885c4085ed52ec5f51c1fe6e8bdc
|