Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

superui is a Bevy plugin that gives you a browser-like environment for building game UI. You author interfaces the way you would for the web — an index.html, a stylesheet, and components — and superui renders them with bevy_ui, styles them with a CSS engine (a modified bevy_flair), and runs their logic in an embedded JavaScript engine.

On top of that browser-like base sits supersolid: a reactive .tsx authoring layer. You write components as plain functions that return markup, hold state in signals, and let the framework update only the parts of the UI that actually changed. This is the recommended way to build UI with superui, and it is what this documentation focuses on.

import { createSignal, render } from "supersolid";

function Counter() {
  const [count, setCount] = createSignal(0);
  return (
    <button class="counter" onClick={() => setCount(count() + 1)}>
      clicked {count()} times
    </button>
  );
}

render(() => <Counter />, document.getElementById("root"));

Why superui

  • Familiar model. Markup, CSS, and a reactive component layer — the concepts and much of the API surface deliberately mirror what you already know from the web, so existing UI knowledge carries over.
  • Fast iteration. With hot reload enabled, editing a .tsx file updates the running game’s UI in place — and preserves component state while it does.
  • Made for games. UI talks to your Bevy world through a small, typed bridge (bevy.send / bevy.on), so buttons fire ECS events and live game data flows back into the interface.

How the pieces fit

LayerWhat it is
superuiThe framework: the browser-like HTML/CSS/JS environment and the Bevy plugin that hosts it.
supersolidThe reactive .tsx layer you author components in — signals, effects, control flow, and rendering.
The Bevy bridgebevy.send / bevy.on, the channel between your UI and the ECS.

Where to go next

Status

This is in very early development. Several working examples already run — see the gallery. The code is largely AI-generated and not yet fully reviewed; APIs are expected to be in flux, though the surface deliberately mirrors familiar web APIs. Use at your own risk.

PROJECTSUPERUI · BEVY UI
DRAWN BYSTROWK
SCALENOT TO SCALE
REVR1 · 0.1 EARLY BUILD
LICENCEMIT / APACHE-2.0