[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5484":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},5484,"gpui-component","longbridge\u002Fgpui-component","longbridge","Rust GUI components for building fantastic cross-platform desktop application by using GPUI.","https:\u002F\u002Flongbridge.github.io\u002Fgpui-component\u002F",null,"Rust",11668,649,38,63,0,6,48,290,36,43.44,"Other",false,"main",true,[27,28,29,30],"desktop-application","gpui","rust","uikit","2026-06-12 02:01:10","# GPUI Component\n\n[English](.\u002FREADME.md) | [简体中文](.\u002FREADME.zh-CN.md)\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Flongbridge\u002Fgpui-component\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Flongbridge\u002Fgpui-component\u002Factions\u002Fworkflows\u002Fci.yml) [![Docs](https:\u002F\u002Fdocs.rs\u002Fgpui-component\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Fgpui-component\u002F) [![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fgpui-component.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fgpui-component)\n\nUI components for building fantastic desktop applications using [GPUI](https:\u002F\u002Fgpui.rs).\n\n## Features\n\n- **Richness**: 60+ cross-platform desktop UI components.\n- **Native**: Inspired by macOS and Windows controls, combined with shadcn\u002Fui design for a modern experience.\n- **Ease of Use**: Stateless `RenderOnce` components, simple and user-friendly.\n- **Customizable**: Built-in `Theme` and `ThemeColor`, supporting multi-theme and variable-based configurations.\n- **Versatile**: Supports sizes like `xs`, `sm`, `md`, and `lg`.\n- **Flexible Layout**: Dock layout for panel arrangements, resizing, and freeform (Tiles) layouts.\n- **High Performance**: Virtualized Table and List components for smooth large-data rendering.\n- **Content Rendering**: Native support for Markdown and simple HTML.\n- **Charting**: Built-in charts for visualizing your data.\n- **Editor**: High performance code editor (Up to 200K lines for stable performance) with LSP (diagnostics, completion, hover, etc).\n- **Syntax Highlighting**: Syntax highlighting for editor and markdown components using Tree Sitter.\n\n## Showcase\n\nhttps:\u002F\u002Flongbridge.github.io\u002Fgpui-component\u002Fgallery\u002F\n\nHere is the first application: [Longbridge Pro](https:\u002F\u002Flongbridge.com\u002Fdesktop), built using GPUI Component.\n\n\u003Cimg width=\"1763\" alt=\"Image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fe1ecb9c3-2dd3-431e-bd97-5a819c30e551\" \u002F>\n\n## Usage\n\n```toml\ngpui = { git = \"https:\u002F\u002Fgithub.com\u002Fzed-industries\u002Fzed\" }\ngpui_platform = { git = \"https:\u002F\u002Fgithub.com\u002Fzed-industries\u002Fzed\", features = [\"font-kit\"] }\ngpui-component = { git = \"https:\u002F\u002Fgithub.com\u002Flongbridge\u002Fgpui-component\" }\n```\n\n### Basic Example\n\n```rs\nuse gpui::*;\nuse gpui_component::{button::*, *};\n\npub struct HelloWorld;\nimpl Render for HelloWorld {\n    fn render(&mut self, _: &mut Window, _: &mut Context\u003CSelf>) -> impl IntoElement {\n        div()\n            .v_flex()\n            .gap_2()\n            .size_full()\n            .items_center()\n            .justify_center()\n            .child(\"Hello, World!\")\n            .child(\n                Button::new(\"ok\")\n                    .primary()\n                    .label(\"Let's Go!\")\n                    .on_click(|_, _, _| println!(\"Clicked!\")),\n            )\n    }\n}\n\nfn main() {\n    gpui_platform::application().run(move |cx| {\n        \u002F\u002F This must be called before using any GPUI Component features.\n        gpui_component::init(cx);\n\n        cx.spawn(async move |cx| {\n            cx.open_window(WindowOptions::default(), |window, cx| {\n                let view = cx.new(|_| HelloWorld);\n                \u002F\u002F This first level on the window, should be a Root.\n                cx.new(|cx| Root::new(view, window, cx))\n            })\n            .expect(\"Failed to open window\");\n        })\n        .detach();\n    });\n}\n```\n\n### Icons\n\nGPUI Component has an `Icon` element, but it does not include SVG files by default.\n\nThe example uses [Lucide](https:\u002F\u002Flucide.dev) icons, but you can use any icons you like. Just name the SVG files as defined in [IconName](https:\u002F\u002Fgithub.com\u002Flongbridge\u002Fgpui-component\u002Fblob\u002Fmain\u002Fcrates\u002Fui\u002Fsrc\u002Ficon.rs#L86). You can add any icons you need to your project.\n\n## Development\n\n### Desktop Gallery (Story)\n\nThe `story` crate is a gallery application that showcases all available components. Run it with:\n\n```bash\ncargo run\n```\n\n### Examples\n\nSome important examples are built into the `story` crate and can be run directly:\n\n```bash\n# Code editor with LSP support and syntax highlighting\ncargo run --example editor\n\n# Dock layout system (panels, split views, tabs)\ncargo run --example dock\n\n# Markdown rendering\ncargo run --example markdown\n\n# HTML rendering\ncargo run --example html\n```\n\nThe `examples` directory also contains standalone examples, each focused on a single feature. Each example is a separate crate, run them with `cargo run -p \u003Cname>`:\n\n```bash\n# Basic hello world\ncargo run -p hello_world\n\n# System monitor (real-time charts with CPU\u002Fmemory data)\ncargo run -p system_monitor\n\n# Window title customization\ncargo run -p window_title\n```\n\n### Web Gallery (WASM)\n\nYou can also run the gallery in a web browser using WASM:\n\n```bash\ncd crates\u002Fstory-web\n\n# Install dependencies (first time only)\nmake install\n\n# Build and run development server\nmake dev\n```\n\nThe gallery will be available at http:\u002F\u002Flocalhost:3000\n\nFor more details, see [crates\u002Fstory-web\u002FREADME.md](crates\u002Fstory-web\u002FREADME.md).\n\nCheck out [CONTRIBUTING.md](CONTRIBUTING.md) for more details.\n\n## Compare to others\n\n| Features              | GPUI Component                 | [Iced]             | [egui]                | [Qt 6]                                            |\n| --------------------- | ------------------------------ | ------------------ | --------------------- | ------------------------------------------------- |\n| Language              | Rust                           | Rust               | Rust                  | C++\u002FQML                                           |\n| Core Render           | GPUI                           | wgpu               | wgpu                  | QT                                                |\n| License               | Apache 2.0                     | MIT                | MIT\u002FApache 2.0        | [Commercial\u002FLGPL](https:\u002F\u002Fwww.qt.io\u002Fqt-licensing) |\n| Min Binary Size [^1]  | 12MB                           | 11MB               | 5M                    | 20MB [^2]                                         |\n| Cross-Platform        | Yes                            | Yes                | Yes                   | Yes                                               |\n| Documentation         | Simple                         | Simple             | Simple                | Good                                              |\n| Web                   | Yes (WASM)                     | Yes                | Yes                   | Yes                                               |\n| UI Style              | Modern                         | Basic              | Basic                 | Basic                                             |\n| CJK Support           | Yes                            | Yes                | Bad                   | Yes                                               |\n| Chart                 | Yes                            | No                 | No                    | Yes                                               |\n| Table (Large dataset) | Yes\u003Cbr>(Virtual Rows, Columns) | No                 | Yes\u003Cbr>(Virtual Rows) | Yes\u003Cbr>(Virtual Rows, Columns)                    |\n| Table Column Resize   | Yes                            | No                 | Yes                   | Yes                                               |\n| Text base             | Rope                           | [COSMIC Text] [^3] | trait TextBuffer [^4] | [QTextDocument]                                   |\n| CodeEditor            | Simple                         | Simple             | Simple                | Basic API                                         |\n| Dock Layout           | Yes                            | Yes                | Yes                   | Yes                                               |\n| Syntax Highlight      | [Tree Sitter]                  | [Syntect]          | [Syntect]             | [QSyntaxHighlighter]                              |\n| Markdown Rendering    | Yes                            | Yes                | Basic                 | No                                                |\n| Markdown mix HTML     | Yes                            | No                 | No                    | No                                                |\n| HTML Rendering        | Basic                          | No                 | No                    | Basic                                             |\n| Text Selection        | TextView                       | No                 | Any Label             | Yes                                               |\n| Custom Theme          | Yes                            | Yes                | Yes                   | Yes                                               |\n| Built Themes          | Yes                            | No                 | No                    | No                                                |\n| I18n                  | Yes                            | Yes                | Yes                   | Yes                                               |\n\n> Please submit an issue or PR if any mistakes or outdated are found.\n\n[Iced]: https:\u002F\u002Fgithub.com\u002Ficed-rs\u002Ficed\n[egui]: https:\u002F\u002Fgithub.com\u002Femilk\u002Fegui\n[QT 6]: https:\u002F\u002Fwww.qt.io\u002Fproduct\u002Fqt6\n[Tree Sitter]: https:\u002F\u002Ftree-sitter.github.io\u002Ftree-sitter\u002F\n[Syntect]: https:\u002F\u002Fgithub.com\u002Ftrishume\u002Fsyntect\n[QSyntaxHighlighter]: https:\u002F\u002Fdoc.qt.io\u002Fqt-6\u002Fqsyntaxhighlighter.html\n[QTextDocument]: https:\u002F\u002Fdoc.qt.io\u002Fqt-6\u002Fqtextdocument.html\n[COSMIC Text]: https:\u002F\u002Fgithub.com\u002Fpop-os\u002Fcosmic-text\n\n[^1]: Release builds by use simple hello world example.\n\n[^2]: [Reducing Binary Size of Qt Applications](https:\u002F\u002Fwww.qt.io\u002Fblog\u002Freducing-binary-size-of-qt-applications-part-3-more-platforms)\n\n[^3]: Iced Editor: \u003Chttps:\u002F\u002Fgithub.com\u002Ficed-rs\u002Ficed\u002Fblob\u002Fdb5a1f6353b9f8520c4f9633d1cdc90242c2afe1\u002Fgraphics\u002Fsrc\u002Ftext\u002Feditor.rs#L65-L68>\n\n[^4]: egui TextBuffer: \u003Chttps:\u002F\u002Fgithub.com\u002Femilk\u002Fegui\u002Fblob\u002F0a81372cfd3a4deda640acdecbbaf24bf78bb6a2\u002Fcrates\u002Fegui\u002Fsrc\u002Fwidgets\u002Ftext_edit\u002Ftext_buffer.rs#L20>\n\n## License\n\nApache-2.0\n\n- UI design based on [shadcn\u002Fui](https:\u002F\u002Fui.shadcn.com), some from [Reui](https:\u002F\u002Freui.io).\n- Icons from [Lucide](https:\u002F\u002Flucide.dev).\n","GPUI Component 是一个使用 Rust 语言构建跨平台桌面应用程序的 UI 组件库。它提供了超过60种原生风格的UI组件，支持macOS和Windows样式，并结合了现代设计理念。该库具有丰富的功能，包括无状态组件、多主题支持、灵活布局以及高性能的数据渲染和图表绘制能力。此外，还内置了高性能代码编辑器，支持语法高亮显示。GPUI Component 适用于需要快速开发美观且响应迅速的桌面应用的场景，无论是企业级软件还是个人项目都能从中受益。",2,"2026-06-11 03:03:36","top_language"]