Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gpui-component

> 编程语言
Open source

Rust GUI components for building fantastic cross-platform desktop application by using GPUI.

12.4K stars0 likes5 views
WebsiteGitHub

About

Rust GUI components for building fantastic cross-platform desktop application by using GPUI.


GPUI Kit

English | 简体中文

Build fantastic, high-performance desktop apps with Rust and GPUI.

GPUI Kit is a comprehensive Rust desktop application framework. It combines a production-ready UI system with application-grade data, layout, and editing capabilities, all built on a reusable foundation of behavior, state, and infrastructure, and opens the finished application to JavaScript extensions.

Documentation: https://gpui-kit.com

gpui-kit             The one crate applications depend on
├── gpui-base        Unstyled behavior, state, and infrastructure
└── gpui-component   GPUI Component: the complete styled UI system

gpui-kit pins the matching GPUI release and re-exports GPUI, base, component, and assets, so a Rust application lists a single dependency. JavaScript extension hosts add gpui-shell separately; gpui-component-shell supplies the styled catalog.

See the executable application recipe and AI-assisted development acceptance checks for a tested starting point and verification commands.

Features

  • 60+ UI Components: Forms, navigation, overlays, feedback, layout, and more, with polished interactions and productive defaults.
  • Production Ready: Used to build Longbridge Pro from day one and continuously refined in a publicly shipped commercial desktop application.
  • Native Feel: Modern controls inspired by macOS and Windows, backed by semantic themes and multiple sizes.
  • 120 FPS: GPU-accelerated interfaces that remain smooth under load.
  • 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, including lists whose items have different sizes.
  • Code Editor: Stable performance at 200K lines with Tree-sitter highlighting and LSP diagnostics, completion, and hover.
  • Dock Layout: Resizable panels, draggable tabs, nested splits, and edge docks — all serializable.
  • Rich Content: Native Markdown and HTML rendering, syntax highlighting, and built-in charts.
  • Design Freedom: Use the complete visual system or build your own on the behavior and infrastructure in gpui-base.
  • JavaScript Extensions: gpui-shell lets a shipped Rust host load panels and business logic as scripts, with every capability granted explicitly.
  • Cross Platform: Ship one Rust codebase to macOS, Windows, and Linux.

Framework Architecture

Three layers. One ecosystem.

Use gpui-component to keep the application coherent with one complete visual and interaction system. Use gpui-base when your product needs to create and own that system itself. Use gpui-shell when the application should be extensible in JavaScript after it ships.

gpui-component gpui-base gpui-shell
Complete, styled components Unstyled behavior and infrastructure JavaScript runtime hosted by Rust
Productive defaults with theming Full control over structure and visual design Capabilities granted one at a time
Best for building applications Best for building design systems Best for plugins and scripted applications
…

Behavior belongs to the foundation. Presentation belongs to the application.

Use gpui-component when you want polished controls ready to ship. Build on gpui-base when your application should own its component source, layout, styling, and motion while reusing difficult interaction behavior. Add gpui-shell when contributors should extend the product without a fork or a release.

The layering follows the same separation that makes the shadcn ecosystem flexible:

GPUI Kit ecosystem Web ecosystem
GPUI HTML + Tailwind CSS
gpui-base Base UI
gpui-component shadcn's styled component layer

Explore the architecture →

Showcase

GPUI Kit has powered Longbridge Pro from day one. The framework is extracted from the demands of a publicly shipped commercial desktop application rather than designed in isolation.

GPUI provides the rendering foundation. Longbridge provides the production foundation.

Usage

toml
[dependencies]
gpui-kit = "0.6"

gpui-kit always brings in GPUI and gpui-base; gpui-component and the default icon set are on by default. Turn default features off to keep only the layers you use. The gpui-component features (inspector, decimal, tree-sitter, and each tree-sitter-<language>) are available under the same names.

Basic Example

…

Icons

The default assets feature bundles the Lucide icon set as gpui-kit-assets; pass it to the application with gpui_kit::application().with_assets(gpui_kit::assets::Assets). To ship your own icons instead, leave that feature out and name the SVG files as defined in IconName.

Skills for AI Coding Agents

Install the GPUI Kit skills for your AI coding agent (Cursor, Claude Code, Gemini CLI, Codex, etc.):

bash
npx skills add longbridge/gpui-kit
Skill Description
gpui-kit Setup, component catalog, usage patterns, GPUI mechanics (elements, entities, async, focus, actions, tests), and the Coding Guides.
gpui-kit-design-guides The Design Guides: layout, spacing, hierarchy, interaction states, overlays, and interface copy.

Development

Desktop Gallery (Story)

The story crate is a gallery application that showcases all available components. Run it with:

bash
cargo run

Examples

Some larger examples reuse the story gallery components and run as standalone packages:

bash
# Dock layout system (panels, split views, tabs)
cargo run -p example-dock

# Markdown rendering
cargo run -p example-markdown

# HTML rendering
cargo run -p example-html

The examples directory also contains standalone examples, each focused on a single feature. Each example is a separate crate, run them with cargo run -p <name>:

bash
# Code editor with LSP support and syntax highlighting
cargo run -p example-editor

# Basic hello world
cargo run -p hello_world

# System monitor (real-time charts with CPU/memory data)
cargo run -p system_monitor

# Window title customization
cargo run -p window_title

Check out CONTRIBUTING.md for more details.

Compare to others

See the comparison with Iced, egui and Qt 6 on the site.

License

Apache-2.0

  • Built on GPUI, the UI framework from Zed Industries, also Apache-2.0. The gpui-pre-* crates are snapshots of it, published with Zed's license and notices intact.
  • UI design based on shadcn/ui, some from Reui.
  • Icons from Lucide.

Issues· 100 open

View all issuesOpen on GitHub
  • #3295

    TextView: reveal_range in a virtual list can panic with duplicate accessibility nodes

    Updated Sep 28, 2026
  • #3234

    example stream-markdown dont work isolation on new catalog

    quickjsUpdated Sep 28, 2026
  • #3286

    input: IME candidate bounds jump to the input origin before repaint

    Updated Sep 28, 2026
  • #3168

    Expose a stable extension seam for externally owned native GPU surfaces

    gpuiUpdated Sep 28, 2026
  • #3183

    Input: focused frame handle has no accessibility node — Tab/click focus resolves to nothing (Role::TextInput not bound to frame_focus_handle)

    inputgpuiUpdated Sep 27, 2026
  • #3051

    Platform-Adaptive Native Theme

    Updated Sep 27, 2026
  • #3192

    macOS: intermittent NSRangeException from _NSTouchBarFinderObservation removing a nextResponder observer

    Updated Sep 27, 2026
  • #2496

    TitleBar buttons hover not updating when moving from inside window (Windows)

    Updated Sep 27, 2026
  • #2532

    Multiple versions of gpui crate cause type incompatibility when using git dependencies

    Updated Sep 23, 2026
  • #3194

    Feature: add responsive grid component

    Updated Sep 23, 2026

> Tags

Rustdesktop-applicationgpuirustuikit

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言