zgui-core is a webui-only shared component — JavaScript modules plus CSS, no Rust crate and no build step of its own. It is consumed the same way as zpwr-i18n and zpwr-file-browser: added as a submodule at frontend/lib/zgui-core and loaded directly from the submodule path — never copied into the app (copies drift and partial-sync, so a missed file silently 404s). This page describes the module surface and where each component came from. Every component is the generic kernel of something one or more apps had already shipped.
Module groups
| group | modules |
|---|---|
| Structural chrome | modal, modal-drag, toast, table, tabs, drawer, header, logo, splash, status-bar, split-pane, breadcrumb, segmented, accordion, tiles |
| Interaction | command-palette, context-menu, keyboard-nav, shortcuts, help-overlay, drag, file-drag, dock, tooltip, popover, tray-popover, ui-idle |
| Controls / widgets | widgets (button · textfield · checkbox · toggle · range · select · badge · chip), color-picker, pager, progress, alert, spinner, settings scaffold |
| Theme / state | colorscheme (5 schemes + custom builder), fzf matcher, export-dialog |
| Helpers | util (escapeHtml · debounce · throttle · clamp · formatBytes · formatDuration · slugify · copyToClipboard · createETA · …), DOM-free esm/util.mjs |
| Styles | base.css, cyberpunk.css, widgets.css, widgets-extra.css, components.css, toast.css, modal.css, table.css, shell.css, controls.css, dock.css, file-drag.css, util.css, shortcuts.css, spinner.css |
Extraction provenance
| component | extracted from |
|---|---|
| fzf matcher, palette, context-menu, drag, tiles, export-dialog, header/logo, toast, modal, table toolkit, keyboard-nav, shortcuts, file-drag, dock, util | Audio-Haxor |
| cyberpunk.css design tokens | zpwr-patch-core |
| drawer | zpwr-clip-engine |
| breadcrumb, split-pane | zpwr-file-browser |
| segmented (inline pill view-switcher) | zcontainer / zreq sub-tabs |
Consumption model
A consuming app adds zgui-core as a submodule at frontend/lib/zgui-core and loads the modules directly from the submodule path — never a copy (the same submodule pattern zpwr-i18n uses); updates are a pointer bump, not a re-copy. Modules attach to window.ZGui; stateful widgets (table column widths, sort, shortcut bindings, drag order, color scheme, dock corners) persist per scope so multiple consumers coexist. The library carries no host-specific assumptions — Tauri-specific paths (native file drag, tray-popover resize) degrade where the host doesn't provide them.