Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Rikitav/Terminality/llms.txt

Use this file to discover all available pages before exploring further.

Terminality is a C++23 terminal UI framework that replaces manual cursor positioning with a proper widget hierarchy. You describe your interface as a tree of controls — containers like Grid and StackPanel, interactive widgets like Button, TextBox, and CheckBox — and Terminality handles sizing, alignment, focus management, and efficient redrawing automatically.

Quickstart

Build your first Terminality app in minutes with a working code example.

Installation

Clone the repo, build with CMake, and link Terminality into your project.

Core Concepts

Understand the widget hierarchy, layout system, events, and rendering pipeline.

API Reference

Complete reference for every class, method, and type in the public API.

How it works

1

Import the module

Add import terminality; to your source file. Terminality ships as a C++23 module — no headers to include.
2

Initialize the application

Call HostApplication::Current().EnterTerminal() to take over the terminal and set up raw input mode.
3

Build your widget tree

Use the init<T>() factory helper and nested lambdas to compose containers and controls into a widget tree.
4

Run the UI loop

Pass your root widget to app.RunUILoop(). Terminality drives the render/input loop, tracks dirty regions, and manages focus navigation until you call RequestStop().

Key features

Widget hierarchy

Grid, StackPanel, Border, and ScrollViewer containers with full child management.

Automatic layout

Star, Auto, and Cell sizing with margin and alignment — no manual coordinate math.

Lazy rendering

Dirty-rect tracking redraws only the cells that changed, keeping output fast.

Focus management

Automatic tab-order navigation and hotkey registration without mesh maps.

Events and properties

Type-safe Event<Args...> and reactive Property<T> with automatic invalidation.

Built-in dialogs

MessageBox, ContextMenu, and OpenFileDialog overlays out of the box.

Build docs developers (and LLMs) love