Skip to main content

Themes

ZigTUI ships 15 built-in themes. Each theme exposes helper methods that return pre-configured Style values just pass them to any widget.

Quick start

const theme = tui.themes.catppuccin_mocha;

tui.widgets.Block{
.title = "Dashboard",
.style = theme.baseStyle(),
.border_style = theme.borderFocusedStyle(),
}.render(area, buf);

Available themes

IdentifierName
defaultDefault 16-colour
nordNord
draculaDracula
monokaiMonokai
gruvbox_darkGruvbox Dark
gruvbox_lightGruvbox Light
solarized_darkSolarized Dark
solarized_lightSolarized Light
tokyo_nightTokyo Night
catppuccin_mochaCatppuccin Mocha
catppuccin_latteCatppuccin Latte
one_darkOne Dark
cyberpunkCyberpunk
matrixMatrix
high_contrastHigh Contrast

Theme style helpers

MethodReturns
baseStyle()Background + default text colour
borderFocusedStyle()Border style for the focused panel
borderUnfocusedStyle()Border style for unfocused panels
highlightStyle()List / table selection highlight
titleStyle()Bordered block title

Preview all themes

Run the bundled demo to see every theme live:

zig build run-themes