https://github.com/longbridge/gpui-component
UI components for building fantastic desktop application by using GPUI.
https://github.com/longbridge/gpui-component
gpui macos shadcn ui windows
Last synced: 6 months ago
JSON representation
UI components for building fantastic desktop application by using GPUI.
- Host: GitHub
- URL: https://github.com/longbridge/gpui-component
- Owner: longbridge
- License: other
- Created: 2024-06-13T13:45:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T13:56:36.000Z (7 months ago)
- Last Synced: 2025-04-03T03:08:58.084Z (6 months ago)
- Topics: gpui, macos, shadcn, ui, windows
- Language: Rust
- Homepage:
- Size: 2.66 MB
- Stars: 654
- Watchers: 11
- Forks: 57
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- StarryDivineSky - longbridge/gpui-component - Component 是一个基于 GPUI 框架构建出色桌面应用程序的 UI 组件库。它旨在简化和加速桌面应用开发,提供各种可复用的 UI 元素。该项目利用 GPUI 的高性能渲染能力,提供流畅的用户体验。核心在于提供一套预构建的组件,开发者可以快速集成到自己的 GPUI 应用中。具体组件类型包括但不限于按钮、文本框、列表等常见 UI 元素。使用 GPUI-Component 可以减少重复代码编写,提高开发效率。项目目标是成为 GPUI 生态系统中重要的 UI 组件资源。开发者可以通过贡献新的组件来扩展该库的功能。GPUI-Component 致力于提供高质量、可定制的 UI 组件,助力开发者构建更具吸引力的桌面应用。 (前端开发框架及项目 / 前端项目_其他)
README
# 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](https://gpui.rs).
## Features
- Accordion
- Alert
- Badge
- Breadcrumb
- Button, Link
- Checkbox, Radio, Switch
- ColorPicker
- DatePicker, DateRangePicker, Calendar
- Dock, Tiles
- Drawer
- Dropdown
- Icon
- Label
- List
- Menu
- Modal
- Notification
- Popover
- Progress & Indicator
- Resizable
- Sidebar
- Skeleton
- Slider
- Table
- Tabs
- TextInput, TextArea, OtpInput
- TextView (Markdown, Simple HTML) to native rendering, syntax highlighting.
- Theming
- TitleBar
- Toggle, ToggleGroup
- Tooltip
- WebView## Showcase
Here is the first application: [Longbridge](https://longbridge.com) that is built by using GPUI Component.
> It still under development, not published yet.
![]()
![]()
![]()
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.
```toml
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](https://github.com/tauri-apps/wry), this is an optional feature, you can enable it by feature flag.
```toml
gpui-component = { git = "https://github.com/longbridge/gpui-component.git", features = ["webview"] }
```More usage can be found in [story](https://github.com/longbridge/gpui-component/tree/main/crates/story) directory.
### Icons
GPUI Component have `Icon` element, but it does not include SVG files by default.
The example is using [Lucide](https://lucide.dev) icons, but you can use any icons you like, just named the svg files like [IconName](https://github.com/longbridge/gpui-component/blob/main/crates/ui/src/icon.rs#L86) 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.
- [gpui-app-windows.zip](https://github.com/user-attachments/files/17396296/gpui-app-windows.zip) - Updated at 2024/10/16
## Development
```bash
cargo run
```More examples can be found in `examples` directory.
Checkout [DEVELOPMENT](DEVELOPMENT) to see more details.
## License
Apache-2.0
- UI design based on [shadcn/ui](https://ui.shadcn.com).
- Icon from [Lucide](https://lucide.dev).