UI component library for Django Cotton
Project description
Django Cotton UI
An optional kit of accessible, themeable UI components for Django Cotton, built with Tailwind CSS v4 and Alpine.js.
📖 Documentation: django-cotton.com/ui
The docs cover installation, theming and every component with live examples.
Install
pip install django-cotton-ui
Add it to INSTALLED_APPS after django_cotton:
INSTALLED_APPS = [
# ...
"django_cotton",
"django_cotton_ui",
]
Then <link> the kit's precompiled stylesheet and load the Alpine bundle in your base
template, no build step is required to use the components, and you re-theme by overriding
the CSS-variable tokens in any stylesheet. A Tailwind v4 build is only needed if your own
pages use Tailwind utility classes (the usual reason any project runs Tailwind); the kit
itself never needs one. If you do run a build, set @custom-variant dark (&:where(.dark, .dark *))
so its dark mode matches the kit's (class-based). See the
installation guide for the full setup.
Usage
Components use the c-ui. prefix:
<c-ui.button variant="primary">Save</c-ui.button>
<c-ui.input name="email" label="Email" placeholder="you@example.com" />
<c-ui.card>
<h3 class="font-semibold">Title</h3>
<p>Content goes here.</p>
</c-ui.card>
Browse the full set with live examples in the component docs.
Requirements
- Python ≥ 3.8 · Django ≥ 4.2 · django-cotton ≥ 2.5
- A precompiled stylesheet ships with the package: just
<link>it, no build step needed to use the components, and theming is done by overriding the CSS-variable tokens in any stylesheet. Tailwind CSS v4 is optional, only if your own pages use Tailwind utility classes. - Alpine.js v3
Roadmap
- CDN — a CDN-hosted stylesheet + bundle for quick prototyping and zero-setup trials.
License
MIT
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
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 django_cotton_ui-0.2.1.tar.gz.
File metadata
- Download URL: django_cotton_ui-0.2.1.tar.gz
- Upload date:
- Size: 152.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.0 Linux/6.17.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b782fdda355eb410115dbcb3076b6ca4d9c15dfc027241f4a3f6e349155877f6
|
|
| MD5 |
58ecacd6290525209227e3bda5a1412b
|
|
| BLAKE2b-256 |
b7f92befe18140ac2d3bebfb921d0ae7a49271c6098b841fabab54eacfc7518e
|
File details
Details for the file django_cotton_ui-0.2.1-py3-none-any.whl.
File metadata
- Download URL: django_cotton_ui-0.2.1-py3-none-any.whl
- Upload date:
- Size: 190.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.0 Linux/6.17.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0be5bffbbcd3585007d096f5acd7f7d4a040ba9233c9f0c0941dbefe35449005
|
|
| MD5 |
25abac7444475983311b6eb004c1ea2f
|
|
| BLAKE2b-256 |
3c79e2ff57d06d7754dca96cda886306285595f591982302ab3936cbccdf49f9
|