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.8.tar.gz (8.0 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.8-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chad_ui-0.0.8.tar.gz
  • Upload date:
  • Size: 8.0 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.8.tar.gz
Algorithm Hash digest
SHA256 2f1fed6734d4505f5cdc3a88cc0ce57f0644f5d657675754e393c312141cbdae
MD5 c9642fb1e404780ee496ab39b1716d2b
BLAKE2b-256 2d83ebef7844f1e5534fe6fb3a466a702c69430737722e1f1f6f7ceb1e8dc4a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chad_ui-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 17a49fe3832cd24e2aa50e33ff99eb4c0e21280536cbb443513082c6113fc793
MD5 759f739710e19dad2b6a1c86576e09ed
BLAKE2b-256 1fbad592e59a1bf2b073e86284745dd295f1cc36c5f61cc824d17c0d2a6794cc

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