@flowtty/inline-tty-backend
v1.0.0-alpha.1
Published
Inline TTY backend for flowtty: redrawable live region with append-only log lines above (the Ink <Static> pattern).
Maintainers
Readme
@flowtty/inline-tty-backend
The inline TTY backend for flowtty — a library for building terminal apps in React.
Unlike @flowtty/tty-backend (which takes over the whole screen via the alt-screen), this backend renders a redrawable live region in place, in the normal scrollback flow, and lets you append permanent log lines above it — the Ink <Static> pattern.
Use it for build logs, progress UIs, and any command that should leave its output in the terminal after it exits:
- A live region at the bottom that repaints on every commit.
printStatic(lines)— flush lines permanently above the live region (driven by flowtty's<Static>component).fullScreen === false, so full-screen-only components (e.g.Menu) correctly opt out.
Install
npm install @flowtty/react @flowtty/inline-tty-backend reactUsage
import { render, Box, Text, Static } from '@flowtty/react';
import { InlineTtyBackend } from '@flowtty/inline-tty-backend';
await render(
<Box flexDirection="column">
<Static items={completedSteps}>
{(step) => <Text key={step.id}>✓ {step.label}</Text>}
</Static>
<Text>Building… {current}</Text>
</Box>,
new InlineTtyBackend(),
);<Static> lines are printed once and scroll away with the terminal; the live region below keeps redrawing.
See also
@flowtty/react— the React adapter.@flowtty/tty-backend— the full-screen alt-screen backend.- flowtty on GitHub — full docs and examples.
