examples/component/input_in_frame.cpp

    //Copyright2021ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<memory>//forallocator,__shared_ptr_access
    #include<string>//forstring,basic_string,operator+,to_string
    #include<vector>//forvector

    #include"ftxui/component/captured_mouse.hpp"//forftxui
    #include"ftxui/component/component.hpp"//forInput,Renderer,Vertical
    #include"ftxui/component/component_base.hpp"//forComponentBase
    #include"ftxui/component/screen_interactive.hpp"//forComponent,ScreenInteractive
    #include"ftxui/dom/elements.hpp"//foroperator|,Element,size,border,frame,vscroll_indicator,HEIGHT,LESS_THAN

    intmain(){
    usingnamespaceftxui;

    Componentinput_list=Container::Vertical({});
    std::vector<std::string>items(100,"");
    for(size_ti=0;i<items.size();++i){
    input_list->Add(Input(&(items[i]),"placeholder"+std::to_string(i)));
    }

    autorenderer=Renderer(input_list,[&]{
    returninput_list->Render()|vscroll_indicator|frame|border|
    size(HEIGHT,LESS_THAN,10);
    });

    autoscreen=ScreenInteractive::TerminalOutput();
    screen.Loop(renderer);
    }