Skip to content

Learning Paths

Faststrap serves several kinds of Python developer. The same component library can support a polished product interface, a data-heavy internal tool, or an ML workflow without forcing every project to adopt the same visual or JavaScript layer.

Beginners: Build A First App

Follow this order when FastHTML and Faststrap are both new:

  1. Read Installation and Quick Start.
  2. Learn the render model and asset lifecycle in the Architecture Guide.
  3. Start with Button, Card, Input, and Grid.
  4. Add server-driven behavior with HTMX Integration and the preset overview.
  5. Add validation, accessibility, and deployment only as the app needs them.

The recommended first application shape is intentionally small:

from fasthtml.common import FastHTML
from faststrap import Button, Card, Container, add_bootstrap

app = FastHTML()
add_bootstrap(app)

@app.get("/")
def home():
    return Container(
        Card("Your first Faststrap page", footer=Button("Continue")),
    )

Frontend And Product Developers

Use the Component Index to choose a composable primitive before writing custom markup. A practical route is:

  • Navbar or SidebarNavbar for application navigation.
  • PageHeader, Stack, Cluster, and Center for page composition.
  • FormGroup, FormBuilder, DataTable, and FilterBar for workflows.
  • Toast, ModernToast, Modal, and ErrorDialog for feedback.
  • theme_variant_css() and Theming for brand identity.
  • Custom Components when a reusable surface is genuinely missing.

Use HTMX presets before adding custom JavaScript for search, polling, lazy loading, loading states, confirmation, and server responses. Use an integration when the browser or a third-party library is the actual source of complexity.

Data Science Developers

Faststrap is useful when Python already owns the data and workflow logic, but the result still needs a real routed web interface:

  • DataTable for searchable, sortable, paginated records; use server-side mode for large datasets.
  • MetricCard, TrendCard, KPICard, DataCard, and RecordDetail for experiment and operational summaries.
  • Chart, Figure, MapView, Markdown, Math, Mermaid, and JsonViewer for outputs and explanations.
  • FilterBar, DateRangePicker, MultiSelect, RangeSlider, and ExportButton for exploration controls.
  • PollUntil, AutoRefresh, SSETarget, and SSEStream for jobs, progress, and live feeds.

The core remains dependency-conscious. Optional renderers and browser libraries should be installed only when the project needs them; consult each component page for dependency and security boundaries.

ML And AI Application Developers

Start with the data-tool path, then add explicit workflow surfaces:

  • TrainingProgress, LiveMetric, and roadmap components are planned rather than current core APIs; do not import them until they appear in a release.
  • Today, compose Progress, MetricCard, DataTable, CodeBlock, JsonViewer, ResultCard, NotificationCenter, and SSETarget for training or inference workflows.
  • Use the Component Registry to let tooling discover available UI primitives instead of guessing component names.
  • Keep agent-facing actions explicit in application routes. Faststrap's registry describes UI components; it is not an authorization system or a substitute for route validation.

Senior Developers And Maintainers

Read these in order when you need predictable extension and release behavior:

  1. Architecture for the FastHTML-to-HTML render and asset model.
  2. Component Defaults for UNSET, process-global configuration, and reset behavior.
  3. Custom Components for registration, attribute conversion, and class composition.
  4. Registry API for metadata and AI/tooling discovery.
  5. Performance, Security, and Testing before deployment.
  6. Upgrading and CHANGELOG.md when moving between releases.

Coverage And Stability

The Component Index is the complete registered UI inventory for the current source tree. Individual pages explain public behavior; generated API blocks expose exact signatures. Stability markers in source and the Stability Policy indicate how much compatibility protection an API receives.

Documentation examples are copy-ready, but they are not authorization, database, or deployment policies. Test route behavior, permissions, responsive rendering, and browser interactions in the application that consumes Faststrap.