Leptos is a Rust web framework with fine-grained reactivity, JSX-like views, and routing on server and client. Server functions bridge backend logic and UI code.
Overview
Leptos targets full-stack web applications written in Rust. It combines a reactive system, templating, and a router that can run on both server and client, with an isomorphic model so UI logic can span environments.
Fine-grained reactivity means updates can touch individual DOM nodes, classes, or elements when signals change, rather than relying on a virtual DOM diff for every state change. Components are described declaratively while the framework maps that structure to browser updates.
Server integration features include server functions that call backend Rust from the client without hand-rolling separate API endpoints for each action. Documentation describes progressive enhancement: pages can render on the server first and gain client-side interactivity afterward, including streaming HTML modes mentioned in comparisons with other Rust UI stacks.
The cargo-leptos tool is intended to simplify building client-and-server apps with starter templates for Actix or Axum. Companion tooling includes a language server and VS Code extension, plus hot-reloading for template edits.
Key features
- Fine-grained reactive signal updates
- JSX-like view templating macro
- Client and server-side routing
- Server functions across client boundary
- Streaming and SSR HTML rendering
- cargo-leptos client-server builds
- VS Code extension and language server
- WASM client deployment support
Use cases
- Full-stack Rust web applications
- Interactive UIs with server-first HTML
- Shared types between client and server
- Component-based sites with reactive state