Skip to the content.

cpp-tui Documentation

cpp-tui is a lightweight, single-header C++ library for creating Text User Interfaces (TUIs). It uses modern C++17 features and provides a rich set of widgets and layout managers, similar to web or GUI frameworks.

Quick Start

#include "cpptui.hpp"
using namespace cpptui;

int main() {
    App app;
    Theme::set_theme(Theme::Dark());

    auto root = std::make_shared<Vertical>();
    root->add(std::make_shared<Label>("Hello, cpp-tui!"));
    root->add(std::make_shared<Button>("Click me", []() {
        // handle click
    }));

    app.run(root);
    return 0;
}

Documentation

🚀 Getting Started

Install the library, compile your first app, and learn the basics in minutes.

📖 Core Concepts

Understand the App lifecycle, Widget model, Theming, Events, and Clipboard support.

📚 API Reference

Complete reference for all widgets — Layouts, Containers, Inputs, Charts, Tables, and more.

🔧 Troubleshooting

Solutions for common issues — wide character display, mouse input, and Unicode pitfalls.


Feature Highlights