14 using namespace ftxui;
16 auto app = App::TerminalOutput();
18 std::string input_text;
19 auto input = Input(&input_text,
"Type a message, then press Enter.");
21 input |= CatchEvent([&](Event event) {
22 if (event != Event::Return) {
25 if (input_text.empty()) {
29 paragraph(input_text) | borderStyled(LIGHT, Color::GrayDark),
30 paragraph(
"You said " + std::to_string(input_text.size()) +
37 auto renderer = Renderer(input, [&] {
40 hbox({text(
"> "), input->Render()}),
41 text(
"Press Ctrl+C to quit.") | dim,