Skip to main content

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


Download files

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

Source Distribution

tungsten_ui-0.1.1.tar.gz (279.7 kB view details)

Uploaded Source

Built Distribution

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

tungsten_ui-0.1.1-py3-none-any.whl (308.2 kB view details)

Uploaded Python 3

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

Hashes for tungsten_ui-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a59742da3e56f53455346cb3575de1d9ee0ebffd4e02195e05084de0ca774211
MD5 f07fdb4f4ba734b20ce3166077d70744
BLAKE2b-256 4002191cb45262fe2ac0f704a34a1a03261d93a8dddd2c3b0fe587f85d9c4294

See more details on using hashes here.

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

Hashes for tungsten_ui-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18100cd8dab168d01ac7a1c6eba842e017662cc21883da4f8eb59479e166cb84
MD5 3d4c47224ce6380b9e90b6ebc746446e
BLAKE2b-256 d6a441d51c384fa7e277a1f927c20a3faba5e94eca1234d4781d8e89cdc42a9a

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