opentui

Build terminal UIs with OpenTUI. Covers Core, frameworks, components, application APIs, testing, extensions, integrations, deployment, and public API lookup.

Install
npx skills add 'https://github.com/anomalyco/opentui/tree/main/packages/web/src/content'
Download bundle ↓
main · ac753b4Scanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

packages/opentui-react.mdx

packages/opentui-react.mdxBrowse 89 files
View on GitHub
← Back to SKILL.md

id: opentui-react name: OpenTUI React summary: React renderer for building terminal user interfaces with OpenTUI Core. kind: renderer official: true source: url: https://github.com/anomalyco/opentui directory: packages/react surfaces:

  • name: React language: typescript import: "@opentui/react" docs: /docs/bindings/react
  • name: Test utilities language: typescript import: "@opentui/react/test-utils" distributions:
  • type: npm identifier: "@opentui/react" install: bun add @opentui/react react links: docs: /docs/bindings/react categories:
  • frameworks
  • rendering

@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.