Skip to content
Logo

Navi

One route table, every frontend.

Navi is a file-based router for Rust UI applications. It is not tied to any single UI framework: the routing engine, loaders, guards, cache, and devtools live in framework-free crates, and all rendering seams are delegated to quoin — one reactive core, many frontend backends. The same route table, components, and devtools panel run unmodified on GPUI, Dioxus, Leptos, Xilem, and Floem.

Build your first app

Follow the golden path from an empty Cargo project to a routed app on your framework of choice.

Ship a feature

Task-focused guides: loaders, guards, blockers, search params, validation, preloading, and more.

Look something up

Reference pages for every crate, macro, component, config key, and core type.

Understand the design

Why Navi is framework-agnostic, how route matching ranks paths, and where the nanoseconds go.

  • File-based routing — define routes intuitively through the filesystem; navi-codegen generates a type-checked route tree at build time.
  • Nested layouts — hierarchical layouts powered by <Outlet>.
  • Loaders — data fetching with caching, stale-time, and garbage collection, backed by rs-query.
  • Suspense boundaries — granular loading states with Awaited and SuspenseBoundary.
  • beforeLoad guards — robust route protection with redirect and not-found results.
  • Navigation blockers — async and sync guards that prevent data loss from unsaved changes.
  • Scroll restoration — automatic memory and restoration of scroll positions, keyed by path plus normalized query.
  • Navigation transactions — batch Push, Replace, Back, Forward, and Go operations applied atomically with a single re-render.
  • Devtools — inspect routes, cache, timeline, and state directly inside your app, on every supported framework.
  • Link preloading — Render, Intent (hover plus delay), and Viewport strategies with per-href deduplication.

Selecting a framework is a feature flag on your crate. There is nothing GPUI-specific inside the router itself.

Framework quoin feature Status
GPUI gpui First-class — devtools panel, keybindings, run_app! host
Dioxus dioxus First-class — Dioxus desktop (wry/tao window)
Leptos leptos First-class — CSR, wasm32-unknown-unknown
Xilem xilem First-class — Xilem main, rebuild-pump refresh
Floem floem First-class — Floem main, reactive bridge