Skip to main content

UIKitPR

The utility-first visual framework built for PyReact.

PyPI Python PyReact License: MIT Docs

Accessible components, themes, utility classes, and a native motion engine in one Python package, with no mandatory Node pipeline.

Website: https://wanbnn.github.io/uikitpr/

Why UIKitPR?

UIKitPR brings Tailwind-like composition and ready-made components to PyReact:

  • predictable utility classes such as flex, gap-4, and grid-cols-3;
  • Python components that return PyReact VNodes;
  • light, dark, and custom themes powered by CSS variables;
  • SSR, handlers, and properties compatible with PyReact's h();
  • CSS bundled in the wheel and exportable through the CLI;
  • motion with springs, timelines, stagger, scroll, events, and lifecycle;
  • fingerprinted web assets, manifests, updates, and Service Workers;
  • loaders, skeletons, and ready-to-use visual states;
  • text animations, animated backgrounds, marquees, and creative surfaces;
  • a native 135-item creative catalog for PyReact;
  • no JavaScript dependency or compilation step.

Installation

prpm add uikitpr

You can also use pip install uikitpr.

Quick start

from uikitpr import Button, Card, CardBody, Heading, Stack, UIProvider


def App(props):
    return UIProvider(
        Card(
            CardBody(
                Stack(
                    Heading("Hello, PyReact!", level=1),
                    Button("Get started", variant="primary"),
                    gap=4,
                )
            )
        ),
        class_name="p-6",
        full_height=True,
    )

Components accept children directly or through h(Component, {"children": ...}). The explicit children property is important with current PyReact functional components.

Utilities

Use classes in className or class_name:

from uikitpr import Box, cx

Box(
    "Content",
    class_name=cx(
        "flex items-center gap-4 p-6 rounded shadow",
        {"bg-primary-soft": highlighted, "hidden": not visible},
    ),
)

The stylesheet includes flex/grid layout, spacing, sizing, typography, colors, borders, shadows, and responsive variants such as md-grid-cols-3.

Components

Group Components
Layout Box, Container, Stack, Grid, Divider
Typography Heading, Text, Badge
Actions Button, IconButton
Forms Input, Textarea, Select, Checkbox, Switch
Feedback Alert, Spinner, Progress, Modal
Data and navigation Card, Table, Navbar, Breadcrumb, Avatar
Creative effects BlurText, SplitText, GradientText, AuroraBackground, Marquee, SpotlightCard

Unconsumed properties are forwarded to the DOM VNode, including onClick, aria-*, data-*, style, id, and name. See the component reference.

Themes

UIProvider includes the CSS and selects a theme:

UIProvider(AppContent(), theme="dark", full_height=True)

Create a branded theme with tokens:

from uikitpr import create_theme

brand = create_theme(
    "my-brand",
    primary="#ff006e",
    primary_hover="#d9005d",
    radius="1rem",
)

UIProvider(AppContent(), theme=brand)

Motion and interaction

UIProvider includes the UIKitPR Motion runtime by default:

from uikitpr import Motion, Spring, Transition

Motion(
    Card(...),
    preset="fade-up",
    trigger="in-view",
    while_hover={"transform": "translateY(-6px) scale(1.02)"},
    while_tap={"transform": "scale(.97)"},
    transition=Transition(
        duration=.7,
        spring=Spring(stiffness=170, damping=18),
    ),
)

The engine supports mount, in-view, click, hover, tap, focus, and scroll animations; presets and custom keyframes; spring physics; staggered groups; timelines; lifecycle events; declarative controls; dynamically added VNodes; and prefers-reduced-motion. See the Motion guide.

Creative effects

from uikitpr import AuroraBackground, BlurText, Marquee, SpotlightCard

AuroraBackground(
    SpotlightCard(BlurText("Build something memorable", delay=.06)),
    color="#6d4aff",
    secondary="#26c6da",
)

The package includes animated text, backgrounds, borders, spotlights, and continuous marquees, all configurable through Python props and compatible with prefers-reduced-motion. Browse the live, copy-ready catalog on the GitHub Pages documentation.

Complete creative catalog

The extended catalog covers 22 text animations, 28 interactive animations, 38 UI components, and 47 backgrounds. Import entries directly from uikitpr:

from uikitpr import Aurora, ClickSpark, Dock, GlitchText

See the complete list. The existing UIKitPR layout Stack remains unchanged; the creative draggable stack is available as CreativeStack or uikitpr.creative.Stack.

Web cache and deployment

CacheManager writes SHA-256-fingerprinted assets, an inspectable manifest, and a versioned Service Worker:

from pathlib import Path
from uikitpr import CacheManager, CachePolicy, cache_script, motion_script, stylesheet

cache = CacheManager(
    Path("public"),
    policy=CachePolicy(name="my-app", version="2026.07.27"),
)
css = cache.add_text("uikitpr.css", stylesheet())
motion = cache.add_text("uikitpr-motion.js", motion_script())
runtime = cache.add_text("uikitpr-cache.js", cache_script())
cache.finalize(precache=["./"])

The browser exposes window.UIKitPRCache.register(), refresh(), manifest(), status(), and clear(). See the cache guide.

Loaders and visual states

from uikitpr import OrbitLoader, Skeleton, SkeletonCard

OrbitLoader(size="lg")
Skeleton(lines=3)
SkeletonCard()

DotsLoader, BarsLoader, RingLoader, PulseLoader, WaveLoader, and PageLoader are also available.

External CSS and CSP

For strict Content Security Policy deployments, export and serve assets separately:

uikitpr css -o static/uikitpr.css
uikitpr css -o static/uikitpr.min.css --minify
uikitpr motion -o static/uikitpr-motion.js
uikitpr creative -o static/uikitpr-creative.js
uikitpr cache -o static/uikitpr-cache.js
from uikitpr import Styles

Styles(href="/static/uikitpr.css")
UIProvider(AppContent(), with_styles=False)

Client-only rendering also supports Styles(inline=True, nonce="...").

Development

prpm install
prpm test
prpm pack
prpm verify dist

The complete example is available in examples/dashboard.py. Build and serve the official website with prpm run site and prpm run serve.

Documentation

The complete English documentation is available on Read the Docs.

License

MIT. See LICENSE.

Metadata

Release files for uikitpr 0.3.2.post3299334255001

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uikitpr 0.3.2.post3299334255001
File Size Uploaded
uikitpr-0.3.2.post3299334255001.tar.gz 51.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uikitpr 0.3.2.post3299334255001
File Interpreter ABI Platform
uikitpr-0.3.2.post3299334255001-py3-none-any.whl Python 3 none any Details

Total release size: 97.9 kB

Release files / uikitpr-0.3.2.post3299334255001.tar.gz

Download URL uikitpr-0.3.2.post3299334255001.tar.gz
Size 51.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7c3b145aa8df3bb5f562509872ba00e54412ad8a54eb5fbcede221623a2e3bfe
BLAKE2b-256 checksum
How to use checksums
49f1ed071b69acdcdbfd6d6cf203c6b44030592ba596bbca9f2f00447b425828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 26, 2026.

Transparency log

Release files / uikitpr-0.3.2.post3299334255001-py3-none-any.whl

Download URL uikitpr-0.3.2.post3299334255001-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52f3087cca7cb4264421fd007778fe6d7e92899643524380828e1f9a913d3f3d
BLAKE2b-256 checksum
How to use checksums
82d4bc3ffaafb675a0796f36e3e775e0648860139c480757fb98d6f316f90c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 26, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page