Built on GPUI. Proven at Longbridge.

Build fantastic, high-performance desktop apps.

A comprehensive Rust desktop framework with a complete UI system, data tables, docking, charts, and a code editor — extensible in JavaScript, and used to build Longbridge Pro from day one.

  • 13.7k stars on GitHub
  • Apache-2.0
  • macOS, Windows, Linux
Cargo.tomlgpui-component = { git = "https://github.com/longbridge/gpui-component" }
main.rs
use gpui_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.

120 FPS rendering

Every frame is drawn by the GPU, so dense interfaces stay smooth instead of dropping frames.

  • 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, zooming and freeform tiles — 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
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))
  • 60+ finished components
  • 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