Favicon of GPUI Component

GPUI Component

GPUI Kit is a Rust desktop UI framework with 75+ components, data tables, a code editor, and WASM support, built on GPUI.

GPUI Component website screenshot
GPUI Component GitHub repository preview

GPUI Kit is a Rust framework for building cross-platform desktop applications on top of Zed's GPUI rendering engine. It targets developers who want a styled, production-tested component library instead of assembling UI primitives from scratch, and it's used to build Longbridge Pro, a shipped commercial trading app.

The project is split into layers: gpui-component gives you a complete, themed UI system with sensible defaults; gpui-base exposes the same behavior and state logic unstyled, for teams building their own design system; gpui-shell adds a JavaScript extension runtime so a shipped Rust host can load panels and logic as scripts. The gpui-kit crate bundles all of this with a pinned GPUI version so an application only needs one dependency.

Key features

  • 75+ components: forms, navigation, overlays, data display, editing, feedback, and layout primitives with polished interaction defaults.
  • Data tables: virtual scrolling, fixed and resizable columns, sorting, and cell selection across hundreds of thousands of rows.
  • Virtual lists: render only the visible range, even when items have variable sizes.
  • Code editor: Tree-sitter highlighting plus LSP diagnostics, completion, and hover, stable at 200K lines.
  • Dock layout: resizable panels, draggable tabs, nested splits, and serializable edge docks.
  • Rich content rendering: native Markdown and HTML, syntax highlighting, and built-in charts.
  • Accessibility: AccessKit roles, names, states, relationships, and actions built into the interaction layer and covered by tests.
  • WebAssembly support: run the same applications and component showcases via wasm32-unknown-unknown.
  • UI integration testing: render real components in headless windows, drive pointer and keyboard input, and assert state and layout.
  • JavaScript extensions: gpui-shell lets a Rust host load panels and business logic as scripts, with capabilities granted explicitly.
  • Layered design: use the full styled system, or build your own look on the unstyled gpui-base behavior layer.
  • Cross-platform: one Rust codebase targets macOS, Windows, and Linux.

Ideal use cases

GPUI Kit fits teams building native desktop applications in Rust that need a polished, consistent UI without hand-rolling every control: trading terminals, internal tools, data-heavy dashboards, or editors that need a real code-editing component with LSP support. It also suits teams that want a plugin architecture, since gpui-shell lets contributors extend a shipped app in JavaScript without a fork.

It's a good fit if you're already committed to GPUI or want GPU-accelerated rendering at high frame rates for data-dense interfaces like large tables or lists. It's less of a fit for web applications (outside the WASM showcase use case), for teams that need a mature, long-established ecosystem with broad third-party tooling, or for projects that require a UI toolkit with wide platform support beyond macOS, Windows, and Linux. Teams not using Rust, or needing a design system radically different from the shadcn-inspired visual language, should look elsewhere or build directly on gpui-base.

Installation

Add the crate to your Rust project:

[dependencies]
gpui-kit = "0.7"

gpui-kit always pulls in GPUI and gpui-base; gpui-component and the default icon set are enabled by default. Disable default features to keep only the layers you need. An optional gpui-fast feature swaps in the GPUI Fast backend for core, native platforms, WASM, and every enabled Kit layer, without changing imports or test macros:

[dependencies]
gpui-kit = { version = "0.7", features = ["gpui-fast"] }

A minimal application looks like this:

use gpui_kit::component::button::*;
use gpui_kit::component::*;
use gpui_kit::*;

pub struct HelloWorld;
impl Render for HelloWorld {
    fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
        div().v_flex().gap_2().size_full().items_center().justify_center()
            .child("Hello, World!")
            .child(Button::new("ok").primary().label("Let's Go!").on_click(|_, _, _| println!("Clicked!")))
    }
}

fn main() {
    gpui_kit::application().run(move |cx| {
        gpui_kit::init(cx);
        gpui_kit::open_window(WindowOptions::default(), cx, |_, cx| cx.new(|_| HelloWorld)).expect("Failed to open window");
    });
}

To explore the component gallery, clone the repo and run the story crate:

cargo run

Standalone examples cover specific features and run as separate crates, for example cargo run -p example-editor or cargo run -p example-dock.

Frequently asked questions

Share:

Stars
18.1K
Forks
1.1K
Last commit
4 hours ago
Repository age
2 years
Self-hosted
No
Activity score
81/100
View Repository
Ad
Favicon

 

  
 

Similar to GPUI Component

Favicon

 

  
 
Favicon

 

  
 
Favicon