Skip to content

inkxReact for modern terminals

Layout feedback, every terminal protocol, React + Elm architectures, 200x+ faster incremental renders. Zero native dependencies.

Explore the Examples

Build Any Terminal App

What's Inside

  • 23+ components -- Box, Text, VirtualList, TextArea, SelectList, Table, Image, Spinner, ProgressBar, and more
  • Scrollable containers -- overflow="scroll" with scrollTo just works. No manual virtualization. Ink's #1 feature request since 2019.
  • Three architectures -- React hooks, Elm-style reducers, or Zustand stores. Choose per use case -- all three in one framework.
  • Built for AI -- Command introspection for agents, programmatic screenshots, scrollable streaming output. CLAUDE.md ships with the package.
  • Input system -- Input layer stack (DOM-style event bubbling), tree-based focus with spatial navigation, command system with keybinding resolution
  • Zero native deps -- Pure TypeScript. No WASM, no C++, no memory leaks. Runs on Node, Bun, and Deno.

Quick Start

bash
bun add inkx react @beorn/flexx
tsx
import { Box, Text, useContentRect } from "inkx"
import { run, useInput } from "inkx/runtime"

function App() {
  const { width } = useContentRect() // Components know their size!
  const [count, setCount] = useState(0)

  useInput((input, key) => {
    if (input === "j" || key.downArrow) setCount((c) => c + 1)
    if (input === "k" || key.upArrow) setCount((c) => c - 1)
    if (input === "q") return "exit"
  })

  return (
    <Box flexDirection="column">
      <Text>Terminal width: {width}</Text>
      <Text>Count: {count}</Text>
    </Box>
  )
}

await run(<App />)

Released under the MIT License.