Proven in production at Longbridge

Build fantastic, high-performance desktop apps.

A production-ready Rust UI framework with 75+ components and primitives, WebAssembly, accessibility, UI integration testing, data tables, docking, charts, code editing, and JavaScript extensions.

  • 16.7k stars on GitHub
  • Software · Apache-2.0
  • macOS, Windows, Linux, WebAssembly
Cargo.tomlgpui-kit = "0.7.1"
main.rs
use gpui_kit::component::{button::*, *};

impl Render for HelloWorld {
    fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
        div()
            .v_flex()
            .gap_2()
            .items_center()
            .child("Hello, World!")
            .child(
                Button::new("ok")
                    .primary()
                    .label("Let's Go!")
                    .on_click(cx.listener(Self::go)),
            )
    }
}
Capabilities

Built for information-dense software.

The systems that real desktop applications need are integrated into one framework.

High refresh support

Update on demand. A 120 Hz display gives each frame about 8.3 ms; smoothness depends on the whole UI and device.

  • RenderOnce
  • GPU

Complex data tables

Virtual scrolling, fixed and resizable columns, sorting and cell selection across hundreds of thousands of rows.

  • Table
  • DataTable

Virtualized lists

Only the visible range is rendered, so very long lists keep scrolling smoothly.

  • VirtualList
  • List

A real code editor

Rope-backed text that stays stable at 200K lines, with Tree-sitter highlighting and LSP diagnostics, completion and hover.

  • Rope
  • Tree-Sitter
  • LSP
  • Highlighter

Freeform dock layout

Dockable panels with drag-to-rearrange and zooming — all serializable.

  • DockArea
  • DockLayout
  • TabGroup

Multi-theme support

Light, dark and custom themes driven by semantic tokens instead of endless style fields.

  • Theme
  • ThemeColor
  • ActiveTheme

WebAssembly

Applications and component showcases run on the web through wasm32-unknown-unknown while sharing their native implementation.

  • WASM
  • Web

Accessibility

AccessKit roles, names, states, relationships and actions are built into the interaction layer.

  • AccessKit
  • Accessibility

UI integration testing

Render real components in headless windows, drive pointer and keyboard input, and assert state, focus, layout and accessibility.

  • gpui_kit::test
  • TestWindowExt
Three layers. One ecosystem.

Choose who owns the visual system.

Use gpui-component for a coherent product, build and own your design system on gpui-base, or open the application to JavaScript extensions with gpui-shell.

gpui-component

Keep the product coherent

gpui-component provides a complete, polished visual and interaction system ready to ship.

Button::new("save")
    .primary()
    .label("Save changes")
    .on_click(cx.listener(Self::save))
  • 75+ components and primitives
  • Light and dark themes included
  • Interaction details already handled
Get started
gpui-base

Own the design system

Reuse focus, selection, overlay and virtualization behavior while owning every pixel.

Button::new("save")
    .on_click(cx.listener(Self::save))
    .rounded_md()
    .child("Save changes")
  • Zero-style primitives
  • Full accessibility behavior
  • 100% visual ownership
Read the gpui-base docs
gpui-shell

Extend it in JavaScript

The host stays Rust and grants what a script may reach, one capability at a time; the script draws real interface in the same process.

import { Button, text } from "gpui";

Button.new("save")
    .on_click((_e, cx) => this.save(cx))
    .child(text("Save changes"))
  • Extend the product without a fork or a release
  • No capability granted by default
  • Hot-reload on save, no restart
Explore gpui-shell
Principle
Behavior belongs to the foundation.Presentation belongs to the application.

gpui-base handles the difficult interaction mechanics — focus, overlay positioning, virtualization and accessibility. Your product decides how they should look and feel.

Explore gpui-base