MyGit

longbridge/gpui-component

Fork: 103 Star: 2187 (更新于 2025-05-11 16:00:25)

license: NOASSERTION

Language: Rust .

UI components for building fantastic desktop application by using GPUI.

最后发布版本: v20250502 ( 2025-05-02 16:14:19)

GitHub网址

GPUI Component

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.

Showcase

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

Image

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 Component depends on a specific version of gpui (kept updated with upstream) to include WebView support.

gpui = { git = "https://github.com/huacnlee/zed.git", branch = "webview" }
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 for more details.

License

Apache-2.0

最近版本更新:(数据更新于 2025-05-12 07:00:40)

2025-05-02 16:14:19 v20250502

2025-04-07 19:02:01 v20250407

2025-02-28 18:59:13 v20250228

2025-02-10 12:04:37 v20250207

2025-02-10 12:01:13 v20250127

主题(topics):

gpui, macos, shadcn, ui, windows

longbridge/gpui-component同语言 Rust最近更新仓库

2025-05-18 22:49:42 louis-e/arnis

2025-05-16 18:44:30 neondatabase/neon

2025-05-16 05:57:32 block/goose

2025-05-15 08:45:56 lapce/lapce

2025-05-14 15:08:58 tursodatabase/limbo

2025-05-13 21:00:57 cot-rs/cot