opentui icon indicating copy to clipboard operation
opentui copied to clipboard

Support an "Inline" Rendering Mode

Open kitlangton opened this issue 2 months ago • 3 comments

I'm curious if you have considered an inline rendering mode, a la ink / claude code:

Image

It can be pleasant, aesthetically, especially for simpler TUIs, for them to take up only as much vertical height as is required to render the view, as opposed to using an alternate buffer and spanning the full available space.

This might not be on the roadmap, and that's completely understandable! Feel free to say "nope" and close without compunction. 🙏 Thanks for the great library, either way!

kitlangton avatar Oct 08 '25 15:10 kitlangton

That is actually already supported experimentally. Check the experimental_splitHeight option for the renderer.

It is very much experimental though, resizing the terminal has issues with it and shutdown might be weird. It hasn't been in focus yet, but will be supported going forward.

Edit: you may have to manually turn off alternate screen usage in renderer options.

kommander avatar Oct 08 '25 16:10 kommander

You rock!

resizing the terminal has issues with it

Claude Code (or maybe ink beneath it) seems to clear the buffer and go full height on resize. Not sure if that technique would help here 😄

kitlangton avatar Oct 08 '25 20:10 kitlangton

There are definitely solutions that will solve it, just a matter of time. The renderer is missing sync activation currently as well, so it might flicker in some terminals. That will also be solved.

kommander avatar Oct 08 '25 20:10 kommander