Introduction
What Karui is, where it fits, and what problems it solves.
Updated: 2026-07-26
What is Karui
Karui is a full-stack TypeScript framework with its own JSX runtime, file-based router, and SSR primitives. It has no runtime dependencies.
It runs on Node, Bun, and Deno, and integrates with Vite for browser development.
Key capabilities
Karui covers server rendering, hydration, typed route loaders and actions, page metadata, and static export โ without assembling a stack from separate packages.
- JSX runtime with React-shaped hooks, no React or Preact
- Keyed reconciler: updates diff against the live DOM
- Hydration that adopts server markup instead of rebuilding it
- File-based routing with nested layouts
- Loaders for reads, actions for writes
- Hydration modes: full, islands, none
- Static export to plain HTML
- CLI for scaffolding and prerendering
What it costs
A typical client app pulls in the JSX runtime and the router. Numbers below are measured on every build and enforced as budgets in CI.
- @rigbyhost/karui/jsx โ 16.8 kB minified, 5.1 kB gzipped
- @rigbyhost/karui/router โ 7.9 kB minified, 2.9 kB gzipped
- jsx + router together โ 24.8 kB minified, 7.6 kB gzipped
- @rigbyhost/karui (jsx + router + ssr) โ 42.5 kB minified, 12.6 kB gzipped