DocsIntroduction
Introduction
Beautiful, accessible components to copy into your PyBlade project. In the spirit of shadcn/ui.
The idea
PyBlade UI is not a library you import. The pyblade-ui add command copies the components' code into your project. From then on the code is yours: change it as you like, without waiting for a new release.
The code is yours
Every component is a template in your components folder.
Themes as CSS variables
shadcn format, OKLCH, Tailwind CSS v4, light and dark.
A complete CLI
Add, compare, update, switch themes.
Quick start
pip install pyblade-ui
cd my-pyblade-project # where pyblade.toml is
pyblade-ui init --base zinc --color blue
pyblade-ui add button card dialogThen use them in any template. See Installation for the details.
<pb-ui.card class="max-w-md">
<pb-ui.card-header>
<pb-ui.card-title>Team</pb-ui.card-title>
<pb-ui.card-description>Invite your colleagues.</pb-ui.card-description>
</pb-ui.card-header>
<pb-ui.card-content>
<pb-ui.button variant="outline" class="w-full">Invite</pb-ui.button>
</pb-ui.card-content>
</pb-ui.card>Components
59 components and 2 blocks, today.
Actions
Button
Displays a button, in six variants and four sizes.
Button link
A link styled as a button.
Button group
Joins buttons into one control.
Toggle
A two-state button that can be on or off.
Toggle group
A set of toggles, single or multiple choice.
Dropdown menu
A menu opened by a trigger.
Context menu
A menu opened with a right click on its area.
Menubar
A desktop-style menu bar: File, Edit, View...
Command
A searchable list of commands, with keyboard navigation.
Forms
Input
A text field.
Input group
An input with icons, text, buttons or a keyboard hint attached inside it.
Textarea
A multi-line text field that grows with its content.
Label
A label for a form control.
Field
A form field: label, control, description and error, wired to @error.
Select
A native select, styled.
Combobox
A select you can search, with keyboard navigation; its value is posted with the form.
Checkbox
A native checkbox, styled.
Radio group
A set of options where only one can be chosen, on native radios.
Switch
A toggle between on and off, on a native checkbox.
Slider
A range input, styled, with its filled track.
Input OTP
A one-time code input, one box per character, with paste support.
Calendar
A month grid to pick a date, localized, with min and max and arrow-key navigation.
Date picker
A button that opens a calendar; the chosen date is posted as YYYY-MM-DD.
Data
Display
Card
A container with header, title, description, action, content and footer.
Item
A row of content: media, title, description and actions.
Badge
A small status label.
Avatar
An image with a fallback for the user.
Alert
A callout for important messages.
Empty
An empty state, with media, title, description and actions.
Kbd
A keyboard key or shortcut.
Spinner
A loading indicator.
Separator
A horizontal or vertical divider.
Skeleton
A placeholder while content loads.
Progress
A progress bar from 0 to 100.
Aspect ratio
Keeps its content at a given ratio.
Scroll area
A scrollable region with a thin, themed scrollbar.
Resizable
Panels you resize by dragging the handle between them, or with the arrow keys.
Typography
Text styles: headings, paragraph, lead, blockquote, list, inline code, and a prose wrapper for HTML content.
Navigation
Sidebar
A collapsible app sidebar: offcanvas or icon mode, a sheet on mobile, Ctrl/⌘+B, and its state kept in a cookie read on the server.
Navigation menu
Site navigation with panels that open on hover and click.
Breadcrumb
The path to the current page.
Pagination
Links to the pages of a list.
Tabs
Panels shown one at a time.
Accordion
Sections that expand one at a time.
Collapsible
A section that shows and hides its content.
Carousel
Slides you scroll through, with buttons, swipe and arrow keys.
Overlays
Dialog
A modal window, opened by its trigger or by name.
Alert dialog
A modal that asks for confirmation and cannot be dismissed by clicking outside.
Sheet
A panel that slides in from an edge of the screen.
Drawer
A panel that rises from the bottom; drag its handle down to close it.
Popover
Rich content in a floating panel, opened by its trigger.
Hover card
A preview card shown on hover and focus, in CSS only.
Tooltip
A hint shown on hover and focus, in CSS only.
Toaster
Toast notifications, raised from JavaScript with toast({...}).
Theme