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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chad_ui-0.0.6.tar.gz
  • Upload date:
  • Size: 7.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.6.tar.gz
Algorithm Hash digest
SHA256 56f7fd30b47fe28616f4d29cb6baaac74b314e8ca317c114d83c2aa9fcc1156a
MD5 dd91e6379a8ef2c5e293fe03ebda50ec
BLAKE2b-256 1d059b15d6dec3e9ab3468692762fabba6d8de8d32574b396248451df957049f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chad_ui-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 23a21b368114bceda1d5343e173287ea8997a94bb6a8a4a342532245aff79d68
MD5 5f7af43a7dae16878d67fc0fa17cfe62
BLAKE2b-256 2341cfe8b407ecc33a761ff99ce64712ea0e76bc097077e78317b682f6748933

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