FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
Getting Started

title-img

Install FTXUI

To set up FTXUI in your project, follow the installation guide, which provides instructions for multiple build systems and package managers.

Minimal Example

Save the following code as main.cpp:

#include <iostream>
int main() {
using namespace ftxui;
Element document = hbox({
text("left") | border,
text("middle") | border | flex,
text("right") | border,
});
auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
Render(screen, document);
screen.Print();
}
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
std::shared_ptr< Node > Element
Definition elements.hpp:22

Build and run it using your preferred build system.
If unsure, start with one of the methods described in the installation page.

Expected output:

┌────┐┌────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└────────────────────────────────────┘└─────┘

Starter Template

For a complete working project, clone the official starter repository:

git clone https://github.com/ArthurSonzogni/ftxui-starter

Follow the build instructions in the README.md of that repository.

Previous Next
Introduction Modules