A starting point for your own zfx applications. This demo implements a live ImGui theme editor in just ~110 lines of code, showcasing:
- UI Reflection: Auto-generated widgets for all theme properties
- Layout System: 50/50 split panels using zfx's constraint layout
- Live Preview: Theme changes apply instantly to the UI itself
- Cross-Platform: Same code runs native and web
Native:
zig build runWeb:
zig build -Dtarget=wasm32-emscripten runThe web build automatically opens in your browser.
This demo is designed to be forked and modified:
- Copy the
demo/directory to start your project - Delete the zig.zon and
zig fetch --savethe latest commit. - Modify
src/main.zigwith your own UI - The build system is already set up for native and web
- See
src/theme.zigfor an example of a layout struct
Start here and build your own cross-platform GUI!