DocsInstallation
Installation
Set up PyBlade UI in an existing PyBlade project.
Requirements
Python 3.11 or newer, PyBlade 0.3 or newer and Tailwind CSS v4. Interactive components also need Alpine.js.
Initialize
pip install pyblade-ui
cd my-pyblade-project
pyblade-ui init --base zinc --color blueinit writes pyblade-ui.toml, generates static/css/theme.css, adds @import "./theme.css"; to static/css/tailwind.css, then installs theme-script and mode-toggle.
Hook up the framework
# Django: settings.py
INSTALLED_APPS = [..., "pyblade_ui"]
# Flask, FastAPI…: once, at startup
import pyblade_uiThe <head>
templates/layout.html
<head>
<pb-ui.theme-script />
<link rel="stylesheet" href="@static('css/app.css')" />
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.9/dist/cdn.min.js"></script>
</head>Adjust the path of the compiled stylesheet (@static) to your framework.
Add components
pyblade-ui add button card dialog
# or everything at once
pyblade-ui add --allDependencies come along: dialog also installs button. add never replaces a file you have changed, unless you pass --overwrite.