No description
Find a file
Jason Lee e443a219be
panel: Add title_suffix to panel and write a custom container panel example. (#669)
- Add to support `xsmall` size for TextInput.
- Add `global`, `global_mut`, `build_panel` static method to
`PanelRegistry`.

<img width="1011" alt="image"
src="https://github.com/user-attachments/assets/1a6e61c4-502a-4d1c-a4ea-2644777fd4d8"
/>
2025-02-27 14:52:28 +08:00
.cargo windows: Set the default stack size to 8M on Windows. (#228) 2024-09-09 13:51:10 +08:00
.github ci: Temporarily skip machete (#663) 2025-02-25 15:13:54 +08:00
assets table: Improve sort icon color and fix stripe row display. (#578) 2025-01-26 16:25:34 +08:00
crates panel: Add title_suffix to panel and write a custom container panel example. (#669) 2025-02-27 14:52:28 +08:00
script script: Fix install script on Ubuntu. (#366) 2024-10-18 23:14:55 +08:00
.gitignore chore: Upgrade GPUI 3 (#587) 2025-01-27 03:58:48 +08:00
Cargo.lock text_view: Fix some case may lose spaces, <br> in HTML and Markdown render. (#667) 2025-02-26 17:52:18 +08:00
Cargo.toml webview: Let webview as a feature and not default enable. (#648) 2025-02-24 14:24:22 +08:00
DEVELOPMENT tiles: Add Tiles (#435) 2024-12-16 20:33:14 +08:00
LICENSE-APACHE Update year of LICENSE-APACHE 2025-02-17 14:48:49 +08:00
README.md webview: Let webview as a feature and not default enable. (#648) 2025-02-24 14:24:22 +08:00

GPUI Component

This is still an early stage of development, we may change API frequently. But the features is ok to use, you must keep tracking our changes.

UI components for building fantastic desktop application by using GPUI.

Features

  • Theming
  • TitleBar
  • Dock, Tiles
  • TextInput, TextArea, OtpInput
  • Button, Link
  • Label
  • Icon
  • Checkbox, Radio, Switch
  • Dropdown
  • Tabs
  • Notification
  • Tooltip
  • Popover
  • Resizable
  • Progress & Indicator
  • Slider
  • Skeleton
  • DatePicker, DateRangePicker, Calendar
  • ColorPicker
  • List
  • Table
  • Menu
  • Drawer
  • Modal
  • WebView
  • Accordion
  • Sidebar
  • Breadcrumb
  • Badge
  • TextView (Markdown, Simple HTML) to native rendering.

Showcase

Here is the first application: Longbridge that is built by using GPUI Component.

It still under development, not published yet.

SCR-20250107-kagq SCR-20250107-kaky SCR-20250107-kapd SCR-20250107-kfvk

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

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.

Demo

If you want to see the demo, here is a some demo applications.

Development

cargo run

More examples can be found in examples directory.

Checkout DEVELOPMENT to see more details.

License

Apache-2.0