Python-first UI component library for StarHTML. shadcn/ui components with zero-configuration setup.
uv add staruifrom 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()| 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 |
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 CSSButton("Click me")
Button(
"Submit Form",
variant="default",
size="lg",
disabled=False,
type="submit",
onclick="handleSubmit()"
)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"
)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")
)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/ -vContributions welcome — see CONTRIBUTING.md.
Built on shadcn/ui design patterns, StarHTML, and Tailwind CSS.

