explaingit

longbridge/gpui-component

11,408RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A library of 60+ ready-made desktop UI components for Rust apps built with GPUI, the same rendering engine behind the Zed code editor, covering everything from buttons to a full code editor.

Mindmap

mindmap
  root((GPUI Component))
    Component types
      Buttons and inputs
      Data tables
      Code editor
      Panel layouts
    Platforms
      macOS
      Windows
      Web via WASM
    Key features
      Syntax highlighting
      LSP code completion
      Markdown rendering
      Live charts
    Setup
      Pull GPUI from Zed repo
      Cargo build
      Not on package registry
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a cross-platform desktop app for macOS and Windows in Rust with a modern UI without designing components from scratch.

USE CASE 2

Add a code editor with syntax highlighting and autocomplete to a Rust desktop application.

USE CASE 3

Display a high-performance data table with hundreds of thousands of rows in a Rust GUI app.

USE CASE 4

Render Markdown or basic HTML inline inside a GPUI-based Rust application.

Tech stack

RustGPUIWASM

Getting it running

Difficulty · moderate Time to first run · 1h+

GPUI is not published to the Rust package registry, you must pull it directly from the Zed repository.

Apache 2.0, use freely in personal and commercial projects. Modify and redistribute, but keep the license notice.

In plain English

GPUI Component is a library of over 60 user interface building blocks for making desktop applications in Rust, using a framework called GPUI (the same rendering engine behind the Zed code editor). It targets developers who want to build cross-platform desktop apps for macOS, Windows, and the web that look modern rather than plain. The components range from everyday controls like buttons and text inputs to more complex structures like resizable panel layouts (called Dock), data tables that can handle hundreds of thousands of rows without slowdown, and a full code editor with syntax highlighting and language-server protocol support for features like code completion and error display. Markdown and basic HTML can also be rendered inline. The visual style draws from macOS and Windows native controls combined with the shadcn/ui design language. Setting up a project requires pulling GPUI itself from the Zed repository (it is not published to Rust's package registry separately), plus this component library. A basic hello-world window with a button takes about twenty lines of code. Icons are not bundled, developers supply their own SVG files named according to the library's naming convention. The project includes a gallery application that shows every component in action. Developers can run it locally with a single cargo command, or browse it in a web browser via a WASM build. Focused examples cover the code editor, dock layout, Markdown rendering, and a real-time system monitor with live charts. Compared to other Rust GUI libraries like Iced or egui, GPUI Component offers a broader component set, built-in charts, a more advanced code editor, and mixed Markdown-plus-HTML rendering. The tradeoff is a larger minimum binary size (around 12 MB) and a dependency on GPUI, which is tightly coupled to the Zed project. The license is Apache 2.0.

Copy-paste prompts

Prompt 1
Show me how to create a simple GPUI app window in Rust using gpui-component with a button that opens a dialog when clicked.
Prompt 2
How do I add a resizable panel layout using the Dock component in my GPUI Rust desktop app?
Prompt 3
Set up a high-performance data table in gpui-component that can render 100,000 rows without lag. Show the Rust code.
Prompt 4
How do I run the gpui-component gallery app locally so I can browse all available components before deciding which ones to use?
Open on GitHub → Explain another repo

← longbridge on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.