Tungsten UI - A Django component library with Cotton, HTMX, JavaScript, Tailwind CSS and DaisyUI
Project description
Tungsten UI
A modern Django component library built with Django Cotton, Tailwind CSS, and DaisyUI.
🚀 Quick Installation
For End Users (Recommended)
1. Install Package
pip install tungsten-ui
This automatically installs Django Cotton as a dependency.
2. Configure Django Settings
Add to your settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Third-party apps
'django_cotton', # Required: Django Cotton
'tungsten_ui', # Tungsten UI
# Your apps
'your_app',
]
3. Include Required Assets
Simple Method (Recommended):
<!-- In your base.html head section -->
{% include "init-components.html" %}
Manual Method (Optional):
<!-- In your base.html -->
<head>
{% load static %}
<!-- Tungsten UI CSS (pre-built) -->
<link rel="stylesheet" href="{% static 'tungsten_ui/css/components.css' %}">
<!-- HTMX -->
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.6/dist/htmx.min.js"></script>
<!-- Alpine.js (for reactive components) -->
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.8/dist/cdn.min.js"></script>
<!-- Tungsten UI JavaScript -->
<script src="{% static 'tungsten_ui/js/components.js' %}"></script>
</head>
4. Start Using Components
<!-- Button component -->
<c-button variant="primary" size="lg">
Click me!
</c-button>
<!-- Card component -->
<c-card class="max-w-sm">
<c-slot name="title">Card Title</c-slot>
<c-slot name="content">
<p>This is a card content.</p>
</c-slot>
</c-card>
<!-- Table with filters -->
<c-table :data="employees">
<c-table.column field="name" label="Name" />
<c-table.column field="department" label="Department" filterable />
<c-table.column field="salary" label="Salary" filterable format="currency" />
</c-table>
📄 License
MIT License
Tungsten UI - Built with Django-cotton, Tailwind CSS, DaisyUI, HTMX, and Alpine.js
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 tungsten_ui-0.1.1.tar.gz.
File metadata
- Download URL: tungsten_ui-0.1.1.tar.gz
- Upload date:
- Size: 279.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0rc3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a59742da3e56f53455346cb3575de1d9ee0ebffd4e02195e05084de0ca774211
|
|
| MD5 |
f07fdb4f4ba734b20ce3166077d70744
|
|
| BLAKE2b-256 |
4002191cb45262fe2ac0f704a34a1a03261d93a8dddd2c3b0fe587f85d9c4294
|
File details
Details for the file tungsten_ui-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tungsten_ui-0.1.1-py3-none-any.whl
- Upload date:
- Size: 308.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0rc3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18100cd8dab168d01ac7a1c6eba842e017662cc21883da4f8eb59479e166cb84
|
|
| MD5 |
3d4c47224ce6380b9e90b6ebc746446e
|
|
| BLAKE2b-256 |
d6a441d51c384fa7e277a1f927c20a3faba5e94eca1234d4781d8e89cdc42a9a
|