An immediate-mode UI framework for V that stays out of your way.
Windows native support is under active validation. The current documented path uses native Windows with MSVC/vcpkg and is tracked in
docs/WINDOWS.md; this is not yet a claim of full Windows parity.

Most UI frameworks want you to think about data binding, observables, and UI thread synchronization. v-gui doesn't. Your view is just a function of your state—change the state anywhere and the UI updates. No wiring. No callbacks to remember. No threading headaches.
The layout engine is inspired by Clay, a fast layout algorithm that makes flex-box style layouts simple to reason about.
V is a simple language. It deserves a simple UI framework.
Good fit if you want:
Maybe not if you need:
Layout
Widgets (30+)
Rendering
Animation
Text (via vglyph/Pango)
Architecture
import gui
@[heap]
struct App {
pub mut:
clicks int
}
fn main() {
mut window := gui.window(
state: &App{}
on_init: fn (mut w gui.Window) { w.update_view(main_view) }
)
window.run()
}
fn main_view(window &gui.Window) gui.View {
app := window.state[App]()
return gui.column(
h_align: .center
v_align: .middle
content: [
gui.text(text: '${app.clicks} clicks'),
gui.button(
content: [gui.text(text: 'Click me')]
on_click: fn (_ &gui.Layout, mut _ gui.Event, mut w gui.Window) {
w.state[App]().clicks += 1
}
),
]
)
}
See GET_STARTED.md for a detailed walkthrough.
v install gui
| Package | Purpose | Source |
|---|---|---|
vglyph | Text rendering | Auto-installed with v-gui |
gg | 2D graphics | V standard library |
sokol.sapp | Windowing and events | V standard library |
| Document | Description |
|---|---|
| GET_STARTED.md | Tutorial: first app to working knowledge |
| ARCHITECTURE.md | How v-gui works under the hood |
| LAYOUT_ALGORITHM.md | Sizing, alignment, and positioning |
| ANIMATIONS.md | Tweens, springs, and transitions |
| SVG.md | Vector graphics and icon rendering |
| MARKDOWN.md | Markdown rendering |
| TABLES.md | Table widget and data display |
| DATA_GRID.md | Data grid widget and API |
| FORMS.md | Form runtime, validation model, and field adapters |
| GRADIENTS.md | Linear and radial gradients |
| SHADERS.md | Custom fragment shaders |
| PRINTING.md | PDF export and platform print flow |
| WINDOWS.md | Windows setup and validation notes, not a final support claim |
| WINDOWS_MANUAL_SMOKE.md | Manual Windows smoke checklist |
| SPLITTER.md | Splitter component (drag, collapse, keyboard) |
Generate API docs with:
v run _doc.vsh
The examples/ folder contains working apps for every feature:
v run examples/get_started.v # Start here
v run examples/buttons.v # Button variants
v run examples/animations.v # Tweens and springs
v run examples/tiger.v # SVG rendering demo
v run examples/markdown.v # Markdown rendering
v run examples/dialogs.v # Custom + native dialogs
v run examples/split_panel.v # Splitter + nested splitter
v run examples/printing.v # PDF export + platform print flow
v run examples/input_masks.v # Input mask presets and custom tokens
v run examples/numeric_input.v # Locale-aware numeric input + step controls
v run examples/form_validation.v # Form validation with sync+async validators
v run examples/text_transform.v # Rotated and affine text
v run examples/table_demo.v # Table widget demo
v run examples/data_grid_demo.v # Data grid widget demo
v run examples/custom_shader.v # Custom fragment shaders
v run examples/snake.v # A complete game
v-gui is in active development. Join the discussion on Discord.
Contributions welcome:
MIT
V
78.0%
C
19.8%
Objective-C
1.8%
An immediate-mode UI framework for V that stays out of your way.
Windows native support is under active validation. The current documented path uses native Windows with MSVC/vcpkg and is tracked in
docs/WINDOWS.md; this is not yet a claim of full Windows parity.

Most UI frameworks want you to think about data binding, observables, and UI thread synchronization. v-gui doesn't. Your view is just a function of your state—change the state anywhere and the UI updates. No wiring. No callbacks to remember. No threading headaches.
The layout engine is inspired by Clay, a fast layout algorithm that makes flex-box style layouts simple to reason about.
V is a simple language. It deserves a simple UI framework.
Good fit if you want:
Maybe not if you need:
Layout
Widgets (30+)
Rendering
Animation
Text (via vglyph/Pango)
Architecture
import gui
@[heap]
struct App {
pub mut:
clicks int
}
fn main() {
mut window := gui.window(
state: &App{}
on_init: fn (mut w gui.Window) { w.update_view(main_view) }
)
window.run()
}
fn main_view(window &gui.Window) gui.View {
app := window.state[App]()
return gui.column(
h_align: .center
v_align: .middle
content: [
gui.text(text: '${app.clicks} clicks'),
gui.button(
content: [gui.text(text: 'Click me')]
on_click: fn (_ &gui.Layout, mut _ gui.Event, mut w gui.Window) {
w.state[App]().clicks += 1
}
),
]
)
}
See GET_STARTED.md for a detailed walkthrough.
v install gui
| Package | Purpose | Source |
|---|---|---|
vglyph | Text rendering | Auto-installed with v-gui |
gg | 2D graphics | V standard library |
sokol.sapp | Windowing and events | V standard library |
| Document | Description |
|---|---|
| GET_STARTED.md | Tutorial: first app to working knowledge |
| ARCHITECTURE.md | How v-gui works under the hood |
| LAYOUT_ALGORITHM.md | Sizing, alignment, and positioning |
| ANIMATIONS.md | Tweens, springs, and transitions |
| SVG.md | Vector graphics and icon rendering |
| MARKDOWN.md | Markdown rendering |
| TABLES.md | Table widget and data display |
| DATA_GRID.md | Data grid widget and API |
| FORMS.md | Form runtime, validation model, and field adapters |
| GRADIENTS.md | Linear and radial gradients |
| SHADERS.md | Custom fragment shaders |
| PRINTING.md | PDF export and platform print flow |
| WINDOWS.md | Windows setup and validation notes, not a final support claim |
| WINDOWS_MANUAL_SMOKE.md | Manual Windows smoke checklist |
| SPLITTER.md | Splitter component (drag, collapse, keyboard) |
Generate API docs with:
v run _doc.vsh
The examples/ folder contains working apps for every feature:
v run examples/get_started.v # Start here
v run examples/buttons.v # Button variants
v run examples/animations.v # Tweens and springs
v run examples/tiger.v # SVG rendering demo
v run examples/markdown.v # Markdown rendering
v run examples/dialogs.v # Custom + native dialogs
v run examples/split_panel.v # Splitter + nested splitter
v run examples/printing.v # PDF export + platform print flow
v run examples/input_masks.v # Input mask presets and custom tokens
v run examples/numeric_input.v # Locale-aware numeric input + step controls
v run examples/form_validation.v # Form validation with sync+async validators
v run examples/text_transform.v # Rotated and affine text
v run examples/table_demo.v # Table widget demo
v run examples/data_grid_demo.v # Data grid widget demo
v run examples/custom_shader.v # Custom fragment shaders
v run examples/snake.v # A complete game
v-gui is in active development. Join the discussion on Discord.
Contributions welcome:
MIT
V
78.0%
C
19.8%
Objective-C
1.8%