2.8 KiB
GPUI Component
UI components for building fantastic desktop application by 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
RenderOncecomponents, simple and user-friendly. - Customizable: Built-in
ThemeandThemeColor, supporting multi-theme and variable-based configurations. - Versatile: Supports sizes like
xs,sm,md, andlg. - 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 that is built by using GPUI Component.
We build multi-themes support in application, this feature is not including in GPUI Component. It is based on Theme feature, so it easy to do.
Usage
GPUI and GPUI Component still in development, so we need add dependency by git.
And GPUI Component depends on gpui by special version (It keep updated to upstream) for including 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 experimental, there have a lot of limitations.
GPUI Component have WebView element based on Wry, this is an optional feature, you can enable it by feature flag.
gpui-component = { git = "https://github.com/longbridge/gpui-component.git", features = ["webview"] }
More usage can be found in story directory.
Icons
GPUI Component have Icon element, but it does not include SVG files by default.
The example is using Lucide icons, but you can use any icons you like, just named the svg files like IconName defined the path name. You can add icons that you need in your project.
Development
We have a gallery of applications built with GPUI Component.
cargo run
More examples can be found in examples directory, you can run them by cargo run --example <example_name>.
Checkout DEVELOPMENT to see more details.
License
Apache-2.0