Python-first UI component library for StarHTML. shadcn/ui components with zero-configuration setup.
Quick Start
uv add starui
from starhtml import *
from components.ui.button import Button
from components.ui.card import Card, CardHeader, CardTitle, CardContent
app, rt = star_app()
@rt("/")
def home():
return Card(
CardHeader(
CardTitle("Welcome to StarUI")
),
CardContent(
Button("Get Started", variant="default"),
Button("Learn More", variant="outline")
)
)
serve()
Available Components
| Component | Description | Variants |
|---|---|---|
| Button | Interactive buttons | default, destructive, outline, secondary, ghost, link |
| Alert | Important messages | default, destructive |
| Badge | Status indicators | default, secondary, destructive, outline |
| Card | Content containers | Header, Content, Footer sections |
| Input | Form inputs | All HTML input types with validation |
| Label | Form labels | Accessible form labeling |
CLI
star init <project-name> # Create new project
star add <component> # Add component to project
star list # List available components
star dev <app.py> # Dev server with hot reload
star build # Build production CSS
Component API
Button
Button("Click me")
Button(
"Submit Form",
variant="default",
size="lg",
disabled=False,
type="submit",
onclick="handleSubmit()"
)
Card
Card(
CardHeader(
CardTitle("Product Card")
),
CardContent(
P("This is the card content with detailed information."),
Button("Learn More", variant="outline")
),
class_name="max-w-md"
)
Configuration
StarUI works with zero configuration, but you can customize it:
# starui.config.py (optional)
from starui.config import ProjectConfig
from pathlib import Path
config = ProjectConfig(
project_root=Path.cwd(),
css_output=Path("static/css/starui.css"),
component_dir=Path("components/ui")
)
Development
git clone https://github.com/banditburai/starui.git
cd starui
uv sync --all-extras
uv run ruff check && uv run pyright && uv run pytest tests/ -v
Contributions welcome — see CONTRIBUTING.md.
Acknowledgments
Built on shadcn/ui design patterns, StarHTML, and Tailwind CSS.
Metadata
Release files for starui 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| starui-0.4.3.tar.gz | 29.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| starui-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.4 kB
Release files / starui-0.4.3.tar.gz
| Download URL | starui-0.4.3.tar.gz |
|---|---|
| Size | 29.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7741132bb615b4785a51af349195dc983b0f11b0e1260e376543f5137fe9279c
|
|
BLAKE2b-256 checksum How to use checksums |
1aa7053a65201ddbe34f69c65694b43d386e67d9ccf524ceeaec4c95e79c8609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logRelease files / starui-0.4.3-py3-none-any.whl
| Download URL | starui-0.4.3-py3-none-any.whl |
|---|---|
| Size | 39.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf779141019018cad637bd40a56a68a16d05477fa0ea312fec3df031074bbbcb
|
|
BLAKE2b-256 checksum How to use checksums |
3f89f600b42853ac7e3dedf0cf05c45a6eab6ebbc92dd2cb4ec69657f215f216
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency log