JSUI: game UI in React Native, rendered everywhere
JSUI is an open-source (MIT), embeddable UI runtime for games. Write ordinary React Native
(import { View, Text } from 'react-native'), then ship it inside your engine through a small C API:
Godot 4, your own C or C++ renderer, or the browser via WebAssembly. JavaScript runs on QuickJS, Yoga lays out the
views and Skia paints them. This whole site is rendered by JSUI's WebAssembly build into one canvas, with no DOM
and no CSS in the UI.
Source code, documentation and issues: github.com/orktes/jsui. A summary for AI assistants: llms.txt.
Runs in
- Godot 4: the
JsuiViewGDExtension, rendering on Godot's own Vulkan or Metal device. - The web: the WebAssembly build with
@orktes/jsui-web, on WebGPU, WebGL or the CPU. - iOS: a UIKit host rendering with Skia on Metal, with touch, keyboards and game controllers.
- Android: an NDK host (NativeActivity) rendering with Skia on OpenGL ES, with touch, keys and gamepads.
- raylib, SDL3 and sokol: example game loops with the same HUD, on raylib's OpenGL context,
any SDL_Renderer backend and sokol_gfx (
integrations/raylib,sdl3,sokol). - Unity 6: a package with a native plugin over the C API and a
JsuiViewcomponent, plus the same example game (integrations/unity). - Unreal Engine 5: a plugin with a
UJsuiWidget(UMG) over a prebuilt JSUI library, plus the same example game (integrations/unreal). - Rust and Go: thin bindings over the C API (a crate and a cgo package) and the same quest-log desktop app in both, drawn on the GPU in a GLFW window (
bindings/rust,bindings/go). - Custom engines: any C or C++ engine through the C API.
- Standalone:
jsui-viewer, a windowed SDL2 host with dev mode.
Features
- Built for coding agents. An agent skill (
npx @orktes/jsui-cli skill install, or the Claude Code plugin:/plugin marketplace add orktes/jsui), headlessjsui screenshot,jsui inspectandjsui runthat run the WebAssembly runtime in Node with no browser, andjsui dev --shared: one live app that a person and agents use together. - Hot updates on every edit.
jsui devserves the bundle and React Fast Refresh updates the running UI in place, keeping component state, with an error overlay for build and runtime errors. - GPU rendering everywhere. Skia Graphite on WebGPU, Metal and Vulkan, Skia on WebGL2 and OpenGL, and a CPU raster fallback that repaints only damaged rectangles.
- Embeds in your engine. A small C API (
include/jsui/jsui.h): feed it mouse, keyboard, touch and gamepad input, tick it, and take pixels or let it draw into your GPU target. Input the UI does not consume passes through to the game. A Godot 4 GDExtension (JsuiView) renders on Godot's own Vulkan or Metal device. - Gamepad-first focus. Spatial D-pad and stick navigation, focus scopes, focus-visible rings, Tab order and hold-to-repeat, built into the runtime.
- Native animation.
useNativeDriver: trueruns springs, timings, decays and interpolations in C++, and Lottie animations play natively on Skia's Skottie with lottie-react-native's API. - Custom SkSL shaders.
ShaderViewpaints views with your own Skia runtime effects, with Animated uniforms and post-processing of a view's children. - Host textures and video.
HostTextureshows textures the game owns (render targets, cameras, decoded video) in place; this site plays Big Buck Bunny through it. - Game data. State shared by key (
useHostState), promise-based calls between the UI and the game (Host.call), and per-frame typed arrays (jsui_set_buffer,useHostBufferValue) that Animated views follow with no JavaScript per frame. - The React Native API. View, Text, Image, ScrollView, FlatList, SectionList, TextInput, Modal, Pressable and StyleSheet; text shaping with HarfBuzz and ICU and bidirectional text; reference tests compare every example pixel by pixel with react-native-web in Chrome.
Get started
npx @orktes/jsui-cli skill install # add the JSUI agent skill to your project
npm install --save-dev @orktes/jsui-cli # the CLI, @orktes/jsui-react and the headless runtime
npx jsui dev src/app.jsx # dev server with hot updates
npx jsui build src/app.jsx -o dist/bundle.js
npx jsui screenshot src/app.jsx -o shot.png
npm packages: @orktes/jsui-react (the React Native API), @orktes/jsui-cli (build, dev server, headless tools and the agent skill) and @orktes/jsui-web (the browser host and its WebAssembly modules).
On this site
- Use cases: embedded game UIs (HUDs and menus inside Godot, Unity, Unreal or your own engine), social UIs for games (friends, party, chat, store) and standalone apps (desktop, mobile and the web).
- Example game screens: main menu, HUD, inventory, battle pass, scoreboard, dialogue, settings, loading, notifications, cinematic, victory and rift screens, each demonstrating a runtime feature, each playable full screen.
- Features: interactions, input and gamepad focus, motion, SVG and Skia Canvas and native components (your own Skia-drawn views).
- Live code playground: edit React Native code and see JSUI render it.
- Embedding guide: Godot, the C API, the web host and dev mode.