Skip to main content

Cotton/HTMX/AlpineJS Django components in the style of shadcn/ui

Project description

PyPI version PyPI - Python Version

chad/ui

Beautifully designed components based on the Cotton/HTMX/Alpine.js stack for Django.

Cotton | HTMX | Alpine.js

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chad_ui-0.0.9.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chad_ui-0.0.9-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file chad_ui-0.0.9.tar.gz.

File metadata

  • Download URL: chad_ui-0.0.9.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Darwin/24.6.0

File hashes

Hashes for chad_ui-0.0.9.tar.gz
Algorithm Hash digest
SHA256 7deab48ef331c565c2251d981e89ea492e85fae3e5baa6ba829672bc3a576956
MD5 9a676e0aadfaaa9ece1fa04f04c215a1
BLAKE2b-256 42f06f33094ba1d6a91761f0dce522a184749ef2a0636e5ce6ea12d5aede68c2

See more details on using hashes here.

File details

Details for the file chad_ui-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: chad_ui-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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

Hashes for chad_ui-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 18ee6441cc4913b646c4a96fd8a8a663fe3f76cfa9f4b123729464d9835afee2
MD5 b895e43ff067c4332e8b4aaac50b2239
BLAKE2b-256 fb2a76a83ea5bce57bb203b2ff402bb23408233a3d2ce96c15d62719be8ec341

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page