UI components library for Django perfectionists
Project description
labb
UI components library for Django perfectionists.
Built on django-cotton, Tailwind CSS, and DaisyUI 5.
Why labb?
Django templates are powerful, but building consistent UI means writing the same markup patterns over and over. labb gives you a growing collection of ready-to-use components that work like native HTML elements in your templates -- no JavaScript framework required.
<c-lb.button variant="primary">Save changes</c-lb.button>
<c-lb.card border>
<c-lb.card.body>
<c-lb.card.title>Django components, done right</c-lb.card.title>
<p>Composable, themeable, and fully server-rendered.</p>
<c-lb.card.actions>
<c-lb.button variant="primary">Get started</c-lb.button>
</c-lb.card.actions>
</c-lb.card.body>
</c-lb.card>
<c-lb.modal id="confirm" withBackdrop withCloseBtn>
<h3>Are you sure?</h3>
<p>This action cannot be undone.</p>
<c-lb.modal.action>
<c-lb.button variant="error">Delete</c-lb.button>
</c-lb.modal.action>
</c-lb.modal>
Features
- Variant-driven API -- control style through props like
variant,size, andbtnStyle, not CSS classes - Composable -- nest components naturally with slots and named slots (
<c-lb.card.body>,<c-lb.modal.action>) - Server-rendered -- no JavaScript runtime, no virtual DOM, just Django templates
- Icon support -- optional
labbiconspackage with multiple icon packs (<c-lbi n="rmx.heart" />) - CLI tooling -- inspect components, search icons, build CSS, and scaffold projects from the terminal
- Python 3.10 - 3.13 and Django 4.2+
Getting started
The fastest way to start a new project with labb is labbstart:
pip install labbstart
labbstart new myproject
This scaffolds a complete Django project with labb, Tailwind CSS, and DaisyUI pre-configured -- ready to run in one command. It supports Poetry, pip, and uv, and includes a welcome page to get you oriented.
Adding to an existing project
pip install labbui
# With icons
pip install labbui[icons]
Add to your Django settings:
INSTALLED_APPS = [
"django_cotton",
"labb",
# ...
]
Quick examples
Buttons
<c-lb.button>Default</c-lb.button>
<c-lb.button variant="primary" size="lg">Large primary</c-lb.button>
<c-lb.button variant="error" btnStyle="outline">Delete</c-lb.button>
<c-lb.button as="a" href="/docs">Link styled as button</c-lb.button>
<c-lb.button variant="success" icon="rmx.check-line">Confirm</c-lb.button>
Dropdown
<c-lb.dropdown>
<c-lb.dropdown.trigger>
<c-lb.button>Options</c-lb.button>
</c-lb.dropdown.trigger>
<c-lb.dropdown.content>
<c-lb.menu>
<c-lb.menu.item>Edit</c-lb.menu.item>
<c-lb.menu.item>Duplicate</c-lb.menu.item>
<c-lb.menu.item>Archive</c-lb.menu.item>
</c-lb.menu>
</c-lb.dropdown.content>
</c-lb.dropdown>
Tabs
<c-lb.tabs variant="bordered">
<c-lb.tabs.content label="Overview" checked>
<p>Overview content here.</p>
</c-lb.tabs.content>
<c-lb.tabs.content label="Settings">
<p>Settings content here.</p>
</c-lb.tabs.content>
</c-lb.tabs>
Alert with icon
<c-lb.alert variant="info" icon="rmx.information-line">
Your changes have been saved.
</c-lb.alert>
CLI
labb ships with a CLI for inspecting components, searching icons, and managing your build:
labb components inspect --list # List all available components
labb components inspect button -v # Inspect a component's API
labb components ex button # View component examples
labb icons search "arrow" # Search icon packs
labb build -w # Watch and build CSS
labb init --defaults # Scaffold a new project
Documentation
Full documentation is available at labb.io.
License
MIT License
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 labbui-0.3.1.tar.gz.
File metadata
- Download URL: labbui-0.3.1.tar.gz
- Upload date:
- Size: 179.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b30d455f55cb10bff9b3daa26e8f839abbf664c16b1f2ee0dc475f5b3f1e609
|
|
| MD5 |
fd08bb9005d2187785828be90c47ba6a
|
|
| BLAKE2b-256 |
74ddde6e6f033cdbeff8362714605402d721a9a83036a55aec8e51cf7416195e
|
Provenance
The following attestation bundles were made for labbui-0.3.1.tar.gz:
Publisher:
release.yml on labbhq/labb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labbui-0.3.1.tar.gz -
Subject digest:
0b30d455f55cb10bff9b3daa26e8f839abbf664c16b1f2ee0dc475f5b3f1e609 - Sigstore transparency entry: 1062396635
- Sigstore integration time:
-
Permalink:
labbhq/labb@3c38a3adb3af04dbd6ce0b1659083c7c26341bcb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/labbhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c38a3adb3af04dbd6ce0b1659083c7c26341bcb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file labbui-0.3.1-py3-none-any.whl.
File metadata
- Download URL: labbui-0.3.1-py3-none-any.whl
- Upload date:
- Size: 374.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b2443c9538df8b1b188f91f03b230109f9fb2ad4a023eb99476b6f011d1caa
|
|
| MD5 |
ef7de0b38ee28f9be064423ccc80f934
|
|
| BLAKE2b-256 |
85df133f9b5f084fd221c0236186285861cfacc24b6050fa31d13f76005108bc
|
Provenance
The following attestation bundles were made for labbui-0.3.1-py3-none-any.whl:
Publisher:
release.yml on labbhq/labb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labbui-0.3.1-py3-none-any.whl -
Subject digest:
05b2443c9538df8b1b188f91f03b230109f9fb2ad4a023eb99476b6f011d1caa - Sigstore transparency entry: 1062396699
- Sigstore integration time:
-
Permalink:
labbhq/labb@3c38a3adb3af04dbd6ce0b1659083c7c26341bcb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/labbhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c38a3adb3af04dbd6ce0b1659083c7c26341bcb -
Trigger Event:
workflow_dispatch
-
Statement type: