Ely-GPUI-Components README

The project's README from github.com/ZacharyZhang-NY/Ely-GPUI-Components. As one markdown file: README.md.

Ely GPUI Component

A component library for GPUI, the Rust UI framework behind Zed. Every component ships in light and dark. The palette is warm and quiet. Color carries meaning, not decoration.

Every component runs live at https://elygpui.com, compiled to WebAssembly.

Status: early. TASKS.md tracks every component, chapter by chapter. To help, see CONTRIBUTING.md.

Use

[dependencies]
ely-gpui-component = { git = "https://github.com/ZacharyZhang-NY/Ely-GPUI-Components" }
gpui = { package = "gpui-pre", version = "=0.3.8" }
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.8", features = ["font-kit"] }
use ely_gpui_component::{Assets, theme::{Mode, Theme}};
use gpui::App;

fn main() {
    gpui_platform::application().with_assets(Assets).run(|cx: &mut App| {
        ely_gpui_component::init(cx).expect("Ely failed to start");
        Theme::set_mode(Mode::Dark, cx);
    });
}

init registers the fonts and the theme. It returns an error if the application's asset source cannot load one of Ely's files.

With GPUI Kit

Ely runs beside Longbridge's GPUI Kit in one window, on the GPUI snapshot Kit 0.7.1 pins. Pass Assets::before(gpui_kit::assets::Assets) as the one asset source, call both inits, open the window with gpui_kit::open_window, and wrap the view in Ely's root FocusScope. The guide covers themes, focus and the inspector; compat/kit holds a whole app and the tests behind each claim.

cargo run --example gallery
cargo run --example gallery -- --page buttons
cargo run --example gallery -- --capture shots   # macOS: PNG of every page, light and dark
ELY_GALLERY_ASSETS=https://example.com/gallery/assets/ scripts/web.sh dist   # for the browser

In a browser, ?page=buttons&story=icon-button&theme=dark draws one section alone; examples/gallery/stories.json lists them all.

Website

cd frontend
pnpm install
ELY_GALLERY_ASSETS=https://<site>/gallery/assets/ pnpm gallery   # the wasm gallery, into public/gallery
pnpm dev        # or: pnpm build && pnpm preview; both fetch the showcase at showcase.lock's commit
ELY_SHOWCASE=../../Ely-GPUI-Showcases pnpm dev   # the showcase from a local checkout
node scripts/og.mjs   # with pnpm preview up: public/og.png from the hero
node scripts/favicon.mjs   # public/favicon.svg, apple-touch-icon.png and ../logo.png from the mark
pnpm deploy     # Cloudflare, through wrangler

Build notes

License

MIT. Lucide icons: ISC. Inter, JetBrains Mono, IBM Plex Sans and the gallery's Noto Sans Hebrew: SIL Open Font License 1.1. The gallery photos in examples/gallery/assets were generated for this project with gpt-image-2.

Ely-GPUI-Components (ZacharyZhang-NY/Ely-GPUI-Components)

Searching Database…

What is this?A themed Rust component library for GPUI (the UI framework behind the Zed editor); components also compile to WebAssembly so each one can be previewed live in a browser.
Is it a UI framework or a component layer on top of one?It's a set of pre-styled components for an existing engine, GPUI, not a standalone framework; you still write your app in GPUI and pull in these widgets.
How Do I Get Started?Call the library's init() function inside your GPUI app to register the bundled fonts and theme; it panics if your app's Assets aren't wired in yet.
Do I Need Accounts Or API Keys?No accounts or API keys are required; the only prerequisite is a working GPUI application with Assets already set up.
What should I know before relying on it?The project is explicitly labeled early-stage, and has only been tested on macOS; the screenshot/capture tooling in particular needs macOS.
Who Is It For?Rust developers building GPUI-based apps (in the style of Zed) who want ready-made, themed components instead of building every widget from scratch.
Where Can I Use These Components?Inside any GPUI application, and the demo gallery runs live in any browser via WebAssembly; building and testing the library itself is currently macOS-only.
What Are The License And Costs?The crate is dual-licensed MIT or Apache-2.0; bundled Lucide icons are ISC, and the Inter/JetBrains Mono/IBM Plex Sans/Noto Sans Hebrew fonts use the SIL Open Font License 1.1.
Does It Need Special Graphics Support To Build?No dedicated GPU is required, but on macOS gpui compiles its Metal shaders at runtime so a full Xcode install isn't needed.
What is GPUI and why does this library depend on it?GPUI is the Rust GPU-accelerated UI framework that powers the Zed code editor; this project is a layer of themed components that plug into GPUI apps rather than a framework of its own.
Can I browse the components without writing any Rust?Yes, there's a browser gallery driven by URL query params like ?page=buttons&story=icon-button&theme=dark, and examples/gallery/stories.json lists every available story.
Why is building limited to macOS right now?Text rendering on gpui's macOS platform backend depends on font-kit, and the README states the project has only been tested on macOS, including its screenshot capture tool.
Where did the gallery photos come from?The images in examples/gallery/assets were AI-generated for this project using gpt-image-2.
Size
9.1 MB
Stars
566
Updated
CommitOct 09
Age
1mo
Commits · 90 Days