BUI Charts
World's biggest charts library, each with its math, examples and API.
GPU accelerated, cross-platform, Supports 10+ Languages.
curl -LsSf https://bui.preetham.top/install.sh | shLinux and macOS · then bui new my-app (Rust, JavaScript, Python, Lua, C, D, C#, Go or Ruby) or bui init in your own project


~7MB
Release binary
~5ms
First frame
~15MB
Memory while idle
0ms
Idle CPU per minute
Ten languages, a dozen syntaxes, one C runtime. Eight of them are here; every snippet comes from the repository's docs and examples.
Every public tkinter and ttk name is there: 7,846 of 7,846. Run an existing program with blenderui-tk and it wakes up looking like Blender.
import blenderui.tksyntax as tkfrom blenderui.tksyntax import ttk, messagebox
root = tk.Tk()name = tk.StringVar(value="Cube")ttk.Entry(root, textvariable=name).pack(fill="x", padx=8, pady=8)ttk.Button(root, text="Greet", command=lambda: messagebox.showinfo("Hi", "Hello " + name.get())).pack()root.mainloop()

$ pip install blenderui && blenderui-tk my_app.py
QWidget, layouts, signals and clicked.connect, drawn by BUI. The everyday subset works today; more is on the way.
from blenderui.qtsyntax import (QApplication, QMainWindow, QWidget, QVBoxLayout, QFormLayout, QLineEdit, QSlider, QProgressBar, Qt)
app = QApplication([])win = QMainWindow()central = QWidget()layout = QVBoxLayout(central)
form = QFormLayout()level = QSlider(Qt.Horizontal)level.setRange(0, 100)bar = QProgressBar()level.valueChanged.connect(bar.setValue) # signals connect to any callableform.addRow("Name:", QLineEdit())form.addRow("Level:", level)form.addRow("Progress:", bar)layout.addLayout(form)
win.setCentralWidget(central)win.show()app.exec()

$ pip install blenderui
rsx!, components and hooks, all 113 HTML elements and modern CSS. Add <NumberSlider> and you get Blender's real slider. Typos in Tailwind classes fail to compile, politely.
use blenderui::prelude::*;
struct Hello;
impl Render for Hello { fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement { rsx! { <body m-0 p-6 flex flex-col gap-4 bg-zinc-900 text-white> <h1 text-2xl font-bold>"Hello, BUI"</h1> <NumberSlider min={0.0} max={10.0} value="5" /> // a real Blender slider </body> } }}
fn main() { Application::new().run(|cx| { cx.open_window(WindowOptions::default(), |_, cx| cx.new(|_| Hello)).unwrap(); });}

$ cargo add blenderui
The same file builds against Zed's gpui, gpui-fast and blenderui. This is the benchmark's settings window: on blenderui it shows its first frame in 40 ms instead of 231 ms.
impl Render for Settings { fn render(&mut self, window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement { let field = |label: &'static str| { div().flex().items_center().gap(px(8.0)) .child(div().w(px(70.0)).text_color(rgb(0xb8b8b8)).child(label)) .child(div().flex_1().h(px(20.0)).px(px(6.0)).rounded(px(4.0)).bg(rgb(0x1d1d1d)) .border_1().border_color(rgb(0x3d3d3d)).text_color(rgb(0xe6e6e6)).child("Cube")) }; div() .size_full().flex().flex_col().gap(px(8.0)).p(px(12.0)) .bg(rgb(0x303030)).text_color(rgb(0xe6e6e6)).text_size(px(13.0)) .child(div().text_size(px(16.0)).child("Settings")) .child(field("Name")) .child(div().w(px(80.0)).h(px(22.0)).rounded(px(4.0)).bg(rgb(0x545454)) .flex().items_center().justify_center().child("Apply")) }}

$ cargo add blenderui
One constructor per HTML element (h2(), ul(), input(), button() …) and gpui's app model. Elements with an id keep their state across renders; cx.notify() re-renders.
use blenderui::prelude::*;
struct Todo { items: Vec<String>, draft: String }
impl Render for Todo { fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement { div().p_4().flex().flex_col().gap_2() .child(h2().child(format!("{} items", self.items.len()))) .child(ul().children(self.items.iter().map(|s| li().child(s.clone())))) .child(div().flex().gap_2() .child(input().id("draft").placeholder("New item").value(self.draft.clone()) .on_change(cx.listener(|this, e: &ChangeEvent, _, cx| { this.draft = e.value.clone(); cx.notify(); }))) .child(button().child("Add").on_click(cx.listener(|this, _, _, cx| { this.items.push(std::mem::take(&mut this.draft)); cx.notify(); })))) }}

$ cargo add blenderui
React 19.3 renders straight to BUI on Node.js or Bun. Hooks keep React's names but hold signals, so a change can update one node without a re-render.
/** @jsxImportSource @blender-ui/react */import { render, useState, Button, Checkbox, ProgressBar, TextField } from "@blender-ui/react"import { TASKS, TAG_COLORS, CSS } from "./todo_style"
function Task({ task, onToggle }) { return ( <div className={task.done ? "item done" : "item"}> <Checkbox checked={task.done} onChange={onToggle} /> <span className="text">{task.text}</span> <span className="tag" style={{ backgroundColor: TAG_COLORS[task.tag] }}>{task.tag}</span> </div> )}
function Tasks() { const [tasks, setTasks] = useState(TASKS) const [filter, setFilter] = useState("All") const [draft, setDraft] = useState("") const all = tasks.value ?? tasks const done = all.filter((t) => t.done).length const pct = Math.round((100 * done) / all.length) const shown = all.filter((t) => filter.value === "All" || (filter.value === "Done") === t.done) return ( <div> <style>{CSS}</style> <div className="head"> <h1>Robot Arm · Sprint 4</h1> <span className="muted">{all.length - done} open · {done} done</span> </div> <div className="add"> <TextField placeholder="Add a task…" value={draft} onChange={(e) => setDraft(e.target.value)} /> <Button onClick={() => draft.value && setTasks((ts) => [...ts, { text: draft.value, tag: "Modeling", done: false }])}>Add</Button> </div> <div className="filters"> {["All", "Active", "Done"].map((f) => ( <span key={f} className={filter.value === f ? "filter on" : "filter"} onClick={() => setFilter(f)}>{f}</span> ))} </div> <div className="list"> {shown.map((t) => ( <Task key={t.text} task={t} onToggle={() => setTasks((ts) => ts.map((x) => (x === t ? { ...x, done: !x.done } : x)))} /> ))} </div> <div className="foot"> <ProgressBar className="bar" max="100" value={String(pct)} /> <span className="muted">{pct}% complete</span> </div> </div> )}
render(<Tasks />, { title: "Tasks (React)", width: 440, height: 370, gpu: true })

$ npm install @blender-ui/react react
Runes, snippets, bindings and scoped styles, unchanged. Svelte's compiled components run on BUI's DOM, so a $state change updates the one node that shows it.
<script> import { Button, Checkbox, ProgressBar, TextField } from "@blender-ui/svelte" import { TASKS, TAG_COLORS, CSS } from "./todo_style"
let tasks = $state(TASKS.map((t) => ({ ...t }))) let filter = $state("All") let draft = $state("") const done = $derived(tasks.filter((t) => t.done).length) const pct = $derived(Math.round((100 * done) / tasks.length)) const shown = $derived(tasks.filter((t) => filter === "All" || (filter === "Done") === t.done))</script>
<div> <svelte:element this={"style"}>{CSS}</svelte:element> <div class="head"> <h1>Robot Arm · Sprint 4</h1> <span class="muted">{tasks.length - done} open · {done} done</span> </div> <div class="add"> <TextField placeholder="Add a task…" value={draft} oninput={(e) => (draft = e.target.value)} /> <Button onclick={() => draft && tasks.push({ text: draft, tag: "Modeling", done: false })}>Add</Button> </div> <div class="filters"> {#each ["All", "Active", "Done"] as f (f)} <span class={filter === f ? "filter on" : "filter"} onclick={() => (filter = f)}>{f}</span> {/each} </div> <div class="list"> {#each shown as task (task.text)} <div class={task.done ? "item done" : "item"}> <Checkbox checked={task.done} onchange={() => (task.done = !task.done)} /> <span class="text">{task.text}</span> <span class="tag" style:background-color={TAG_COLORS[task.tag]}>{task.tag}</span> </div> {/each} </div> <div class="foot"> <ProgressBar class="bar" max="100" value={String(pct)} /> <span class="muted">{pct}% complete</span> </div></div>
<!-- app.js: render(Tasks, { title: "Tasks", gpu: true }) -->

$ npm install @blender-ui/svelte svelte
Refs, v-model, slots and scoped styles, unchanged. Vue's own runtime and compiler run through a custom renderer over BUI's DOM, so a ref change updates the nodes that show it.
<script setup>import { ref, computed } from "vue"import { Button, Checkbox, ProgressBar, TextField } from "@blender-ui/vue"import { TASKS, TAG_COLORS, CSS } from "./todo_style"
let nextId = 0const tasks = ref(TASKS.map((t) => ({ ...t, id: nextId++ })))const filter = ref("All")const draft = ref("")const done = computed(() => tasks.value.filter((t) => t.done).length)const pct = computed(() => Math.round((100 * done.value) / tasks.value.length))const shown = computed(() => tasks.value.filter((t) => filter.value === "All" || (filter.value === "Done") === t.done))const add = () => { if (draft.value) tasks.value.push({ id: nextId++, text: draft.value, tag: "Modeling", done: false }) }</script>
<template> <div> <component :is="'style'">{{ CSS }}</component> <div class="head"> <h1>Robot Arm · Sprint 4</h1> <span class="muted">{{ tasks.length - done }} open · {{ done }} done</span> </div> <div class="add"> <TextField placeholder="Add a task…" v-model="draft" /> <Button @click="add">Add</Button> </div> <div class="filters"> <span v-for="f in ['All', 'Active', 'Done']" :key="f" :class="filter === f ? 'filter on' : 'filter'" @click="filter = f">{{ f }}</span> </div> <div class="list"> <div v-for="task in shown" :key="task.id" :class="task.done ? 'item done' : 'item'"> <Checkbox v-model="task.done" /> <span class="text">{{ task.text }}</span> <span class="tag" :style="{ backgroundColor: TAG_COLORS[task.tag] }">{{ task.tag }}</span> </div> </div> <div class="foot"> <ProgressBar class="bar" max="100" :value="String(pct)" /> <span class="muted">{{ pct }}% complete</span> </div> </div></template>
<!-- app.js: render(Tasks, { title: "Tasks", gpu: true }) -->

$ npm install @blender-ui/vue vue
createElement, appendChild, addEventListener and className with Tailwind. Any attribute can be a signal: bind it once and the node follows.
const { App } = require("@blender-ui/native")const { TASKS, TAG_COLORS, CSS } = require("./todo_style")
const app = new App({ gpu: true })const win = app.window({ title: "Tasks", width: 440, height: 370 })const el = (tag, cls, text) => { const e = win.createElement(tag) if (cls) e.className = cls if (text !== undefined) e.appendChild(win.createTextNode(String(text))) return e}win.body.setAttribute("styled", "")win.body.appendChild(el("style", null, CSS))
const head = el("div", "head")head.appendChild(el("h1", null, "Robot Arm · Sprint 4"))const count = el("span", "muted")head.appendChild(count)win.body.appendChild(head)
const add = el("div", "add")const input = win.createElement("TextField")input.setAttribute("placeholder", "Add a task…")add.appendChild(input)const addBtn = el("Button", null, "Add")add.appendChild(addBtn)win.body.appendChild(add)
const filters = el("div", "filters")for (const [i, f] of ["All", "Active", "Done"].entries()) filters.appendChild(el("span", i === 0 ? "filter on" : "filter", f))win.body.appendChild(filters)
const list = el("div", "list")win.body.appendChild(list)const foot = el("div", "foot")const progress = win.createElement("ProgressBar")progress.className = "bar"progress.setAttribute("max", "100")foot.appendChild(progress)const pct = el("span", "muted")foot.appendChild(pct)win.body.appendChild(foot)
const tasks = TASKS.map((t) => ({ ...t }))const refresh = () => { for (const c of [...list.childNodes]) { list.removeChild(c); c.destroy() } for (const t of tasks) { const row = el("div", t.done ? "item done" : "item") const box = win.createElement("Checkbox") if (t.done) box.setAttribute("checked", "") box.addEventListener("change", (e) => { t.done = e.target.checked; refresh() }) row.appendChild(box) row.appendChild(el("span", "text", t.text)) const tag = el("span", "tag", t.tag) tag.style = { backgroundColor: TAG_COLORS[t.tag] } row.appendChild(tag) list.appendChild(row) } const done = tasks.filter((t) => t.done).length count.textContent = `${tasks.length - done} open · ${done} done` progress.setAttribute("value", String(Math.round((100 * done) / tasks.length))) pct.textContent = `${Math.round((100 * done) / tasks.length)}% complete`}addBtn.addEventListener("click", () => { if (input.value) { tasks.push({ text: input.value, tag: "Modeling", done: false }); refresh() }})refresh()

$ npm install @blender-ui/native
Existing ImGui code compiles unchanged. Flip one build option (BUI_IMGUI_BLENDER_WIDGETS) and DragFloat becomes Blender's drag-to-scrub field.
#include "imgui.h"#include "imgui_impl_bui.h"
static void frame(void*) { ImGui::ShowDemoWindow(); }
int main() { ImGui::CreateContext(); ImGui_ImplBUI_App* app = ImGui_ImplBUI_CreateApp("Dear ImGui on BUI", 1280, 800, frame, nullptr); ImGui_ImplBUI_RunApp(app); // BUI's message loop until the window closes ImGui_ImplBUI_DestroyApp(app); ImGui::DestroyContext();}

$ cmake -S . -B build -DBUI_IMGUI_BLENDER_WIDGETS=ON && cmake --build build
cimgui conventions: ImGui::Button is ImGui_Button, references become pointers, every struct keeps its C++ layout.
#include "cimgui.h"#include "cimgui_impl_bui.h"
static void frame(void* user){ float* value = (float*)user; ImGui_ShowDemoWindow(); ImGui_Begin("Hello"); ImGui_SliderFloat("Value", value, 0.0f, 1.0f); ImGui_Text("%.2f", *value); ImGui_End();}
int main(void){ float value = 0.5f; ImGui_CreateContext(); cImGui_ImplBUI_App* app = cImGui_ImplBUI_CreateApp("Hello", 1280, 800, frame, &value, NULL); cImGui_ImplBUI_RunApp(app); cImGui_ImplBUI_DestroyApp(app); ImGui_DestroyContext();}

$ cmake -S . -B build && cmake --build build --target bui_imgui_demo_c
snake_case functions; an in/out value comes back after the result: changed, v = imgui.slider_float(…).
import blenderui.imgui as imgui
state = {"value": 0.5}
def frame(): imgui.show_demo_window() imgui.begin("Hello") _, state["value"] = imgui.slider_float("Value", state["value"], 0.0, 1.0) imgui.end()
imgui.run(frame, title="Hello", size=(1280, 800))

$ pip install blenderui
&mut values for in/out arguments, &str for strings, slices for (pointer, count) pairs. imgui::sys has every C function.
use blenderui_imgui as imgui;
fn main() { let mut value = 0.5f32; imgui::run("Hello", [1280, 800], move || { imgui::show_demo_window(); imgui::begin("Hello"); imgui::slider_float("Value", &mut value, 0.0, 1.0); if imgui::button("Reset") { value = 0.5; } imgui::text(&format!("value {value:.2}")); imgui::end(); });}

$ cargo run -p blenderui-imgui --example demo
Everything above sits on one C runtime. Build a node tree, set properties, and open a native window.
#include "BUI_kit.h"
int main(void){ BKNode *root = BK_node_new("frame"); BKNode *size = BK_node_new("slider"); BK_set_str(size, "label", "Size"); BK_set_num(size, "max", 10); BK_set_num(size, "value", 2.5); BK_node_add(root, size, -1); /* -1: append */ BK_geom_set_manager(size, BK_GEOM_PACK); /* Tk's packer */
BKContext *ctx = BK_context_new(root); BKHost host = {0}; /* the window fills it in */ BK_context_set_host(ctx, &host); BKWindow *win = BK_window_new(ctx, "BUI from C", 320, 120); BK_window_show(win); BK_window_run(); return 0;}

$ cmake -S . -B build && cmake --build build
A bui-lua executable and a bui module for Lua 5.4, LuaJIT and LuaRocks. Nodes, properties and events, the same as the C kit.
local bui = require("bui")
local root = bui.Node("frame")root:set("padding", 12)
local label = bui.Node("label")label:set("text", "Count: 0")root:add(label)label:geom(bui.GEOM_PACK, {side = 0, fill = 1})
local count = 0local inc = bui.Node("button")inc:set("text", "Increment")inc:on(bui.EV_CLICK, function() count = count + 1 label:set("text", "Count: " .. count)end)root:add(inc)inc:geom(bui.GEOM_PACK, {fill = 1, pady0 = 4})
local win = bui.Window(bui.Context(root), "Counter", 240, 200)win:show()bui.run()

$ luarocks install blenderui
The view builds the window from your state and runs again after input. Controls bind to the state, and a headless Tester checks it.
type counter struct{ n int }
func (s *counter) view(c *ui.Context) { if c.Shortcut(0, ui.KeyUp) { s.n++ } ui.Column(c).Fill().Center().Gap(16).Children(func() { ui.Textf(c, "%d", s.n).FontSize(56).Bold() ui.Row(c).Gap(8).Children(func() { if ui.Button(c.Key("decrement"), "−").Width(44).Clicked() { s.n-- } if ui.Button(c.Key("reset"), "Reset").Disabled(s.n == 0).Clicked() { s.n = 0 } if ui.PrimaryButton(c.Key("increment"), "+").Width(44).Clicked() { s.n++ } }) })}

$ go run ./examples/counter
A C extension gem, no FFI. Columns, rows and buttons are blocks, and the same interface renders without a window for tests.
require "bui"
class Counter attr_reader :count
def initialize(ui) @count = 0 ui.column padding: 16, spacing: 8 do |col| @shown = col.label "0", text_align: "center", bold: true col.row spacing: 4 do |row| row.button("Decrement") { self.count = count - 1 } row.button("Reset") { self.count = 0 } row.button("Increment") { self.count = count + 1 } end end end
def count=(n) @count = n @shown.text = n.to_s endend
BUI.app do win = window("Counter", width: 300, height: 120) Counter.new(BUI::Builder.new(win.root))end

$ bundle install && ruby -Ilib examples/counter.rb
Not look-alikes: the number fields, sliders, color picker and node editor are ported from Blender's source, behaviour included.
Location
Render
A browser sketch of BUI's widgets, not the native ones. Try: drag down across X, Y and Z, hover a field and pressCtrl C then Ctrl V on another, Shift while dragging, Backspace.
A browser sketch of the feel. In BUI these widgets are native, drawn by the C kit.
Panels, number sliders, the color picker, pie menus, tree views and a node editor: Blender's own, ported from interface_widgets.cc.
from blenderui.components import App, Panel, NumberSlider, VectorField, Checkbox, ColorSwatch, Button
App("Object", (420, 520), Panel("Transform", VectorField("Location", (0.0, 1.25, 0.0)), NumberSlider("Scale", 1.0, min=0, max=10, on_change=print)), Panel("Shading", Checkbox("Shadows", True), ColorSwatch("Color", (0.8, 0.3, 0.1, 1.0))), Button("Apply", on_click=lambda: print("apply")),).run()

Charts, dockable panels and more, built on the same renderer and ready to drop into your app.
World's biggest charts library, each with its math, examples and API.
Infinite tiling: dockable panels with splits, tabs and a saved layout.Read the guideA port of zopra-panels, itself a port ofTrellis.
The habits Blender users rely on all day come along for free, in every language BUI speaks.
Press a key, flick toward a choice, release. Point here to aim.
“ad cu” finds Add Cube; typos are forgiven. It's Blender's search, ported, and it also runs this site's .
The keyboard habits of Blender users, in every app.
Menus open on press and pick on release, so a whole choice is one gesture. Drag across checkboxes to set them all.
Drag down across X, Y and Z to edit all three at once, and hover a field with Ctrl+C then Ctrl+V on another to copy a value. Panels collapse with Blender's own animation. The panel above is a browser sketch; the real widgets are native.
Widget drawing is a C port of interface_widgets.cc; interaction follows interface_handlers.cc.
Windows, Linux, macOS and Android today. iOS isn't built yet.
| Feature | Windows | Linux | macOS | Android | iOS |
|---|---|---|---|---|---|
| Window | Native (Win32) | Native (X11, Wayland experimental) | Native (Cocoa) | Native (NativeActivity) | PlannedNot yet |
| Python (pip install) | WorksWheels | WorksWheels | WorksWheels | PlannedNot yet | PlannedNot yet |
| Rust | Works | WorksBuild from source | Works | Worksandroid_main! | PlannedNot yet |
| JavaScript / React | WorksPrebuilt on npm | WorksPrebuilt on npm (glibc 2.35+) | PartialHeadless for now | WorksReact, Vue, Svelte on QuickJS | PlannedNot yet |
| C, C++, Dear ImGui | Works | Works | Works | Works | PlannedNot yet |
| Renderer | CPU raster, or GPU (Direct3D 11) | CPU raster, or GPU (OpenGL 3.3) | CPU raster | CPU raster | — |
| HiDPI | Per-monitor DPI | Xft.dpi | Retina | Display density | — |
WorksThe macOS window host is a port of Blender's Cocoa code (GHOST), and it works: checked by CI and tried by hand on three Macs (two Apple Silicon, one Intel), by Krish Kalaria, who also fixed what he found, and DanNoby, and piaoboo (an Intel MacBook Pro). Python can also use the standard Tk window there (BUI_HOST=tk). If you have an older macOS and a free afternoon, the macOS testing guide walks you through it.
Honest status: these aren't built yet. Follow along, or pick one up.
The Cocoa host works (tried by hand on three Macs). Next there: the GPU renderer (Metal, or OpenGL) and Node windows on the main thread.
The kit in the browser: the raster blits to a <canvas>, and React and the DOM-like API run on top, unchanged.
BUI panels inside egui apps, plus a Blender-styled egui theme.
Thin adapters over @blender-ui/native, the layer React, Svelte and Vue already share.
C#, Zig, Swift and Kotlin over the same C header; Godot, Unity, Bevy and Flutter.
Per-glyph fallback (Blender's BLF), input methods on X11 and macOS (Windows has them), units in number fields and widget drag and drop.
More GPU backends drawing the same instance stream as Direct3D 11 and OpenGL.
Date and calendar widgets, QThread, drag and drop and Qt stylesheets, on top of today's docks, toolbars, model/view and dialogs.