ZigZag brings typed Model-Update-View applications, rich styling, flexible layout, and 40+ components to the terminal with no third-party dependencies.
| Capability | Highlights |
|---|---|
| Architecture | Typed Model-Update-View, commands, async tasks, sub-programs |
| Components | 40+ inputs, tables, lists, charts, forms, and overlays |
| Styling | ANSI, 256-color, TrueColor, adaptive themes, borders, and text overflow |
| Layout | Placement, Flexbox constraints, split panes, and layered composition |
| Terminal support | Keyboard, mouse, clipboard, images, suspend/resume |
| Performance | Diff rendering, ANSI compression, and virtual lists |
Events update the model, then view renders the next terminal frame.
flowchart LR
E["Input · timer · async"] --> U["update"]
U --> M["Model"]
M --> V["view"]
V --> T["Terminal"]
U --> C["Command"]
C --> E
Requires Zig 0.16.0 or newer.
zig fetch --save git+https://github.com/meszmate/zigzag#mainconst zigzag = b.dependency("zigzag", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zigzag", zigzag.module("zigzag"));Start with the counter example.
| Category | Includes |
|---|---|
| Input and forms | Text input, text area, checkbox, radio group, slider, dropdown, form, file picker, stepper |
| Data and navigation | List, virtual list, table, sortable table, data table, tree, tabs, breadcrumbs, screen stacks |
| Visualization | Progress, spinner, gauge, sparkline, chart, bar chart, heatmap, canvas, Braille canvas |
| Overlays and feedback | Modal, confirmation, tooltip, notification, toast, context menu, command palette |
| Content and tooling | Markdown, code view, diff view, rich log, status bar, help, developer console |
| Demo | Run |
|---|---|
| Showcase | zig build run-showcase |
| Dashboard | zig build run-dashboard |
| File browser | zig build run-file_browser |
| WebAssembly | zig build run-wasm_app |
Reference · Examples · Contributing
- zmenu, a simple Zig application launcher for GNU/Linux
If ZigZag helps you build a terminal application, consider starring the repository. Stars help other Zig developers discover the project, show that the framework is useful, and motivate continued work on components, terminal support, and documentation.
