opentui-react[official]
OpenTUI React
@opentui/react is a React renderer for OpenTUI. It requires React >=19.2.0.
import { createCliRenderer } from "@opentui/core"
import { createRoot } from "@opentui/react"
function App() {
return <text>Hello, world!</text>
}
const renderer = await createCliRenderer({ exitOnCtrlC: true })
const root = createRoot(renderer)
root.render(<App />)createRoot() adopts the renderer. The code that creates the renderer owns renderer.destroy().
React hooks expose the renderer and terminal events through the React lifecycle.
Read the React bindings, components overview, runtime and platform support, testing, and package entry points.