ZigTUI - Terminal User Interface Library
Project Overview: ZigTUI is the first full-featured cross-platform TUI framework for Zig β works seamlessly on Windows, Linux, and macOS. Inspired by Ratatui, it provides a simple and composable API for building beautiful, interactive terminal applications.
β 82 stars on GitHub | π₯ 50+ users across the Zig community
Features
- Cross-platform support β Windows, Linux, and macOS
- Cell-based rendering with diff algorithm for efficient updates
- Constraint-based layouts for flexible UI design
- Composable widgets β Block, Paragraph, List, Gauge, Table
- Keyboard and mouse event handling
- ANSI color and text styling support
- Kitty Graphics Protocol for image display
- Unicode block fallback for terminals without graphics support
- Explicit memory management β no hidden allocations
Widgets
- Block β A container with optional border and title
- Paragraph β Display text with optional wrapping
- List β A scrollable list of items
- Gauge β A progress bar component
- Table β Display tabular data
Graphics Support
ZigTUI now supports image display in terminals using the Kitty Graphics Protocol and more!

Whatβs New:
- Kitty Graphics Protocol implementation for displaying actual images in the terminal
- Base64 chunked transmission for large images
- Automatic terminal capability detection
- Unicode half-block fallback for terminals without graphics support (Windows Terminal, iTerm2, etc.)
- Built-in BMP decoder for the fallback mode
Terminal Compatibility:
| Terminal | Platform | Kitty Graphics |
|---|---|---|
| Kitty | Linux, macOS | Full support |
| WezTerm | Windows, Linux, macOS | Full support |
| Konsole | Linux | Partial support |
| Windows Terminal | Windows | Fallback mode |
Quick Start
const std = @import("std");
const tui = @import("zigtui");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var backend = try tui.backend.init(allocator);
defer backend.deinit();
var terminal = try tui.terminal.Terminal.init(allocator, backend.interface());
defer terminal.deinit();
// Your TUI code here...
}
Requirements
- Zig 0.15.0 or later
- Windows 10+ or Linux/macOS with ANSI escape sequence support