Loom takes the @rbxts/react (or vide) UI tree you already ship to Roblox and renders it in a
browser, with Roblox layout semantics rather than CSS ones. UIListLayout, UIPadding,
AutomaticSize, UISizeConstraint and text measurement are computed by a Rust layout engine
compiled to WASM. The result is painted into plain DOM nodes. Clicks, keyboard input and hover route
back through UserInputService and instance signals, so a preview is interactive, not a screenshot.
The delivery mechanism is Vite. One plugin, loomPreview(), does all of it. It aliases
@rbxts/react, @rbxts/react-roblox and @rbxts/services onto browser adapters. It installs the
Roblox datatype globals such as UDim2, Color3, Enum and game, plus the Luau standard
library, before your entry evaluates. It rewrites roblox-ts import X = require(...) statements to
ESM. And it resolves packages whose main points at uncompiled Luau straight to their TypeScript
source. There is no roblox-ts build step in the loop — esbuild transpiles the same TSX, and HMR
works.
It generates the page too, so a roblox-ts source tree needs no index.html and no entry wiring:
import { loomPreview } from "@loom-dev/preview/vite";import { defineConfig } from "vite";
export default defineConfig({ plugins: [loomPreview()] });Or skip the config file entirely with loom preview . — the CLI is the same plugin with a server
around it.
import { loomPreview } from "@loom-dev/preview/vite";import { defineConfig } from "vite";
// Aliases @rbxts/react, @rbxts/react-roblox and @rbxts/services onto the// loom adapters, installs the Roblox globals, and sets the automatic JSX// runtime — a roblox-ts source tree then runs unmodified in the browser.export default defineConfig({ plugins: [loomPreview()],});Guides
Wire it into a project.
Reference
Every flag, alias, and export.
A preview tool, not a runtime.
Nothing loom produces ships to Roblox. It renders your UI tree in a browser so you can iterate without a Studio round-trip, and its fidelity is deliberately partial — UIScale, UIPageLayout and UITableLayout are not implemented. Read the scope before you trust a preview as ground truth.