Gallery

The desktop gallery is the library's runnable documentation: one page per component, every example, and a theme switcher.

Run it from a HeroGPUI checkout. The first build compiles GPUI and can take several minutes; later runs are much faster.

Shell
1cargo run -p herogpui-gallery

The window opens at 1280×820. Browse the sidebar, or jump straight to a page and appearance:

Shell
1HEROGPUI_PAGE="Button" HEROGPUI_THEME=dark cargo run -p herogpui-gallery

Open one example

HEROGPUI_SECTION filters the page to a matching heading — the same names the website Usage selector uses:

Shell
1HEROGPUI_PAGE="Button" HEROGPUI_SECTION="Usage" cargo run -p herogpui-gallery

HEROGPUI_WINDOW_SIZE=1200x2000 overrides the size when you need a taller capture. HEROGPUI_PREVIEW=component draws only that example, which is how the catalog tiles are taken.

Installed launcher

Install the gallery as a CLI when you want it without keeping a cargo workspace open:

Shell
1cargo install --path gallery --locked
2herogpui-gallery

Same examples as the website

Each component page embeds the gallery compiled to WebAssembly. Use this desktop app when you want the real window, keyboard, and overlays.