Introduction
What Chroma is, who it is for, and where to start building.
Chroma is a fine-grained reactive web framework whose engine runs on Rust and WebAssembly.
You can ship the same app portably in the browser or as an executable through Chroma Desktop. The APIs and plugins look the same from your code; storage, origins, and dev workflow depend on the runtime mode.
You write the UI as plain JavaScript functions in .chr files. When a value changes, Chroma updates only the text node or attribute bound to it. There is no virtual DOM, no diffing, and no JSX compiler.
In plain words: a component is a normal function that runs once and builds real DOM nodes. A piece of state is a getter you hand to the DOM, and the DOM follows it.
// src/App.chr
import { hookState, e } from "../pkg/chroma.js";
export function App() {
const [count, setCount] = hookState(0);
return e(
"button",
{ onClick: () => setCount(count() + 1) },
"Count: ",
count,
);
}Clicking the button updates only the text node bound to count. Nothing re-renders.
Why Chroma
- Each component runs exactly once. Reactive expressions stay bound to the exact DOM node they update.
- The whole engine is WASM. Signals, dependency tracking,
e,Fragment, and every DOM operation live in the.wasmbinary. The only JavaScript in the package is the loader generated bywasm-bindgen. - No build step in development.
chroma devserves your.chrfiles directly.chroma buildbundles and minifies them for production with Chroma's own compiler. Nothing else to install: no Node.js, no npm, nonode_modules(see prerequisites).
The one rule
A child or an attribute is reactive only if you pass it as a function. The full explanation is in Reactivity.
What is included
- Hooks:
hookState,useEffect,useLayoutEffect,useMemo,useCallback,useRef,useReducer,createContext/useContext,useDebugValue. - Control-flow components:
Show,For. - Style helpers:
cva,cx. - Core functions:
render,e,Fragment, and the screen router (createRouter,matchRoute,parseQuery).
Not included: keyed list reconciliation, DevTools. SSR is not available. See Limitations.
The toolchain
| Piece | What it does |
|---|---|
| CLI | chroma install, new, dev, build, validate |
| Dev server | Static server behind chroma dev (Chroma-Server) |
| Runtime modes | Portable (web) vs executable (Desktop) — same APIs, different host behavior |
| Desktop | Tauri shell that runs chroma build bundles locally |
| Plugins | Storage (Chroma-Fs), styling (Chroma-Style), API routing |
| Extensions by mode | Per-plugin Portable vs Executable matrix (browser, Desktop, editor tools) |
| Linter and VS Code | Manifest and .chr diagnostics in the editor |
Who it is for
Chroma is built for organizations of any size, from a single team's tool to the application portfolio of a large company. Every app shares one .chr UI format and one chroma.json manifest, so teams ship employee-facing tools and public products without a different stack per project, and the same app can run in the browser or as a desktop executable.
License
Chroma and its first-party toolchain are licensed under the GNU GPL v3 and are free to use, including in commercial products. See Licensing.
Where to go next
Quick start
Install, scaffold, run, and build an app in five steps.
Runtime modes
Web vs Chroma Desktop — when behavior differs even though the API matches.
Extensions by mode
What each plugin and tool does in Portable vs Executable hosts.
Concepts
How reactivity, components, and hooks work.
Reference
Every exported function, signature by signature.
Examples
Runnable apps you can copy from.