longbridge / gpui-component
- суббота, 10 мая 2025 г. в 00:00:01
UI components for building fantastic desktop application by using GPUI.
UI components for building fantastic desktop applications using GPUI.
RenderOnce
components, simple and user-friendly.Theme
and ThemeColor
, supporting multi-theme and variable-based configurations.xs
, sm
, md
, and lg
.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.
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" }
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.
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.
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.
Apache-2.0