GPUI Component

Rust GUI 组件,通过 GPUI 构建出色的跨平台桌面应用程序。「Rust GUI components for building fantastic cross-platform desktop application by using GPUI.」

Github星跟踪图

GPUI Component

Build Status

UI components for building fantastic desktop applications using GPUI.

Features

  • Richness: 40+ cross-platform desktop UI components.
  • Native: Inspired by macOS and Windows controls, combined with shadcn/ui design for a modern experience.
  • Ease of Use: Stateless RenderOnce components, simple and user-friendly.
  • Customizable: Built-in Theme and ThemeColor, supporting multi-theme and variable-based configurations.
  • Versatile: Supports sizes like xs, sm, md, and lg.
  • Flexible Layout: Dock layout for panel arrangements, resizing, and freeform (Tiles) layouts.
  • High Performance: Virtualized Table and List components for smooth large-data rendering.
  • Content Rendering: Native support for Markdown and simple HTML.
  • Charting: Built-in charts for visualization your data.
  • Code Highlighting: Code Editor and Syntax highlighting.
  • Wef: (Experimental) Offscreen rendering webview based on CEF.

Showcase

Here is the first application: Longbridge Pro, built using GPUI Component.

We built multi-theme support in the application. This feature is not included in GPUI Component itself, but is based on the Theme feature, so it's easy to implement.

Usage

GPUI and GPUI Component are still in development, so you need to add dependencies by git.

gpui = { git = "https://github.com/zed-industries/zed.git" }
gpui-component = { git = "https://github.com/longbridge/gpui-component.git" }

WebView

Still early and experimental; there are a lot of limitations.

GPUI Component has a WebView element based on Wry. This is an optional feature, which you can enable with a feature flag.

gpui-component = { git = "https://github.com/longbridge/gpui-component.git", features = ["webview"] }

More usage examples can be found in the story directory.

Icons

GPUI Component has an Icon element, but it does not include SVG files by default.

The example uses Lucide icons, but you can use any icons you like. Just name the SVG files as defined in IconName. You can add any icons you need to your project.

Development

We have a gallery of applications built with GPUI Component.

cargo run

More examples can be found in the examples directory. You can run them with cargo run --example <example_name>.

Check out DEVELOPMENT.md for more details.

License

Apache-2.0

主要指标

概览
名称与所有者longbridge/gpui-component
主编程语言Rust
编程语言 (语言数: 13)
平台
许可证Other
所有者活动
创建于2024-06-13 21:45:39
推送于2025-10-30 20:18:14
最后一次提交
发布数14
最新版本名称v0.4.0-preview0 (发布于 )
第一版名称v20250127 (发布于 )
用户参与
星数6.5k
关注者数30
派生数254
提交数1.3k
已启用问题?
问题数217
打开的问题数28
拉请求数1132
打开的拉请求数4
关闭的拉请求数90
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?