Skip to content

Welcome to FastStrap

FastStrap Logo

Modern Bootstrap 5 components for FastHTML.
Build beautiful web UIs in pure Python with zero JavaScript knowledge.


The Vision

FastStrap aims to be the standard component library for FastHTML, providing 100+ production-ready Bootstrap 5 components. It combines the power of Python, the simplicity of FastHTML, and the maturity of Bootstrap into a single, cohesive experience.

Why FastStrap

FastHTML is amazing for building web apps in pure Python, but building UI from scratch can be time-consuming. FastStrap bridges the gap by providing a comprehensive set of production-ready Bootstrap 5 components that just work.

  • Pure Python


    No JavaScript, HTML, or CSS knowledge required. Define your UI with Python classes and intuitive keyword arguments.

  • FastHTML Native


    Built specifically for FastHTML. Seamlessly integrates with HTMX for dynamic, SPA-like experiences without the complexity.

  • Bootstrap 5.3


    Leverages the world's most popular CSS framework. Responsive, accessible, and themeable out of the box.

  • Type Safe


    Modern Python 3.10+ type hints for specific arguments. Great IDE support with auto-completion.

{ .grid .cards }

At a Glance

Live Preview
Welcome Back
@app.route("/")
def home():
    return Card(
        Input("username", label="Username", placeholder="Enter username"),
        Input("password", label="Password", input_type="password"),
        Button("Login", variant="primary", cls="w-100 mt-3"),
        title="Welcome Back",
        style={"max-width": "400px", "margin": "2rem auto"}
    )

Features

  • 170+ exports: Components and helpers across forms, display, navigation, and layouts.
  • HTMX Presets: ActiveSearch, InfiniteScroll, AutoRefresh, LazyLoad, LoadingButton, OptimisticAction, LocationAction, PollUntil, SSEStream.
  • SEO Module: SEO meta tags, Open Graph, Twitter Cards, and JSON-LD structured data.
  • PWA Module: one-call installable app setup (manifest, service worker, install flow).
  • Zero Build Step: No webpack, no npm, no node_modules.
  • Dark Mode: Automatic or user-toggled dark mode support.
  • HTMX Ready: hx_* attributes are first-class citizens.
  • Icons Included: Built-in helper for Bootstrap Icons.
  • Visual Effects: Scroll-reveal animations, hover effects, and transitions CSS only.
  • Data UI: DataTable, Chart, MetricCard, TrendCard, KPICard, DashboardGrid.
  • Renderers: Markdown, SVG, Mermaid.

Showcase Layer

Faststrap now has a dedicated showcase/ layer for polished, production-style references.

  • novaflow_ai_saas.py
  • fastcloud_generated_saas.py (compact minimal-good example)
  • northstar_ops_dashboard.py
  • agency_portfolio.py
  • carenest_clinic.py
  • ledgerleaf_finance.py
  • learnloop_academy.py
  • lexbridge_corporate.py
  • forgedocs_platform.py

See the Showcase section in the docs for the current flagship set and screenshot conventions.

Stats

  • 152 registered UI components implemented.
  • 170+ components, helpers, presets, and integrations available.
  • 8 interaction presets + 6 response helpers + 1 auth decorator + 3 SSE helpers.
  • 100% Python.

Next Steps

  • Browse the Component Index.
  • Read the Architecture Guide to understand the render model.
  • Use the Upgrade Guide when moving between Faststrap versions.
  • Review the repository ROADMAP.md for future component and integration direction.

License

FastStrap is licensed under the MIT License.