vrnimje / quick-ftxui

A Quick & Easy way to render terminal user interfaces, using FTXUI.
https://vrnimje.github.io/quick-ftxui-docs/
5 stars 1 forks source link

Quick-FTXUI

A Quick & Easy way to render terminal user interfaces, using FTXUI.

Example

It converts this JSON-like code into a TUI

DoubleBorder Vertical{
    str x
    Red underlined Text("This opens firefox")
    Blue Button{
        "Open firefox",
        System("/usr/bin/firefox"),
        Animated,
        x
    }
    Light separator
    int y = 20
    Yellow Slider {
        "A Slider: ",
        y,
        0,
        100,
        1
    }
    separator
    RoundedBorder Horizontal {
        int z = 1
        int w
        Red Dropdown {
            [ "Zain", "Mahesh", "Alqama", "Vaidic", "Mundane", "Advait", ],
            z
        }
        Cyan Toggle {
            [ "On", "Off", ],
            w
        }
    }

    Dashed separator

    RedLight Button {
        "Exit",
        "Exit",
        Ascii
    }
}

Output

https://github.com/vrnimje/quick-ftxui/assets/103848930/715c821b-b259-4e2b-ab25-2484ad3c47c1

Features

Note: To run the above examples, build this repository with the steps mentioned here

Check out the documentation for learning more about the language: vrnimje.github.io/quick-ftxui/

Build instructions:

mkdir build
cd build
cmake .. -G "Ninja" -DQUICK_FTXUI_TESTS=ON
ninja
./quick-ftxui ../examples/Button.qf

Build with examples:

mkdir build
cd build
cmake .. -G "Ninja" -DQUICK_FTXUI_EXAMPLES=ON
ninja
./cpp_examples/quick_ftxui_example

Dependencies

Acknowledgements