The goal* is a keyboard-only, text-based UI running inside a browser, with windowed UI elements and ASCII graphics.
I've looked into Xterm.js, React TUI libraries, and vanilla JS canvas solutions, but I'd love input from those who've built something similar.
Are there any existing projects or libraries I should check out?
Would appreciate any insights, cheers!
(*And the ultimate end goal is to have an LLM create interfaces on the fly from user prompts)
You can use CSS to make the scrolling window grow from the bottom to the top of the screen, like a DOS window would scroll up and then off.
If this were my project, I'd start with plain browser web components[0] rather than a framework. You could definitely have Cursor write the UI portion for you and then, once you like it, add the command handling.
I wrote an article[1] with some strategies and examples of this kind of complex prompt-driven development with Cursor.
[0] https://levelup.gitconnected.com/getting-started-with-web-co...
[1] https://levelup.gitconnected.com/license-to-kill-coding-with...
Ahhh, here ya go: https://github.com/vinibiavatti1/TuiCss
via: https://news.ycombinator.com/item?id=28804309
There may be more too: https://kristopolous.github.io/BOOTSTRA.386/
Edit: I also found this: https://news.ycombinator.com/item?id=37418424
Am also investigating xterm.js currently.
Anything that uses too much CSS (eg tries to 'construct' layouts with it rather than just rending text) seems a little fragile.
Ideally, JS is only for computation, HTML only for making content containers, and all layout and appearance is in CSS.
And gp is absolutely correct about it being fragile, cause it’s fragile as hell.
You can also find a lot of similar projects by searching for ncurses along with HTML or JavaScript or CSS.