Besides the thing Alextp has already linked (which is my newest lib), I've already attempted to write a framework for TUI applications a while ago, see:
https://github.com/Warfley/LazTextFormsIt provides labels, check boxes, edits, listboxes and buttons and works ok-ish. An example project can be found also on my github:
https://github.com/Warfley/PokeTeamBuilderBut my new library (
https://github.com/Warfley/LazTermUtils the one Alextp linked) is much more robust and I would highly recommend you using it instead, but you need to implement the whole TUI stuff yourself.
That said, in the coming weeks I might actually rewrite the TUI library, but until them, this is the best I can offer.
Besides my libs there is also Free Vision, maybe have a look into it:
https://wiki.freepascal.org/Free_Vision