React for CLIs — build and test interactive command-line apps using React components and Flexbox layouts in the terminal.
At a Glance
Fully free and open-source under the MIT License. Free to use, modify, and distribute.
Engagement
Available On
Listed Apr 2026
About Ink
Ink brings the React component model to the terminal, letting developers build interactive CLI applications using the same JSX syntax, hooks, and component patterns they already know from web development. It uses Facebook's Yoga engine to support Flexbox layouts in the terminal, making CSS-like properties available for positioning and sizing. Since Ink is a full React renderer, all React features — including hooks, context, Suspense, and concurrent mode — work out of the box. It is used in production by tools like Claude Code, GitHub Copilot CLI, Cloudflare Wrangler, Gatsby, Prisma, and Shopify CLI.
- React-based UI — Write CLI UIs using JSX components like
<Text>,<Box>,<Static>, and<Transform>with familiar React patterns. - Flexbox layouts — Use CSS-like Flexbox properties (flexDirection, alignItems, justifyContent, gap, padding, margin) powered by the Yoga layout engine.
- Rich hooks API — Built-in hooks including
useInput,usePaste,useApp,useStdin,useStdout,useWindowSize,useFocus,useFocusManager, anduseCursor. - Screen reader support — ARIA props (
aria-role,aria-label,aria-state,aria-hidden) enable accessible CLI output for screen reader users. - Concurrent & Suspense support — Enable React Concurrent Rendering mode for async data fetching,
useTransition, anduseDeferredValue. - Incremental rendering — Optional incremental rendering mode updates only changed lines, reducing flicker for frequently updating UIs.
- Alternate screen buffer — Render apps in the terminal's alternate screen (like vim/htop) with automatic restoration on exit.
- Kitty keyboard protocol — Optional support for enhanced keyboard input including modifier keys, key event types (press/repeat/release), and key disambiguation.
- Testing support — Use
ink-testing-libraryandrenderToString()to unit-test CLI components without a live terminal. - React Devtools integration — Inspect and modify component trees live using React Devtools by running with
DEV=true. - CI-aware rendering — Automatically adapts output for CI environments, writing only the final frame instead of continuously updating the terminal.
- Scaffolding tool — Bootstrap new projects instantly with
npx create-ink-appsupporting both JavaScript and TypeScript.
Community Discussions
Be the first to start a conversation about Ink
Share your experience with Ink, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Fully free and open-source under the MIT License. Free to use, modify, and distribute.
- Full React renderer for CLIs
- Flexbox layouts via Yoga
- All hooks (useInput, useFocus, useWindowSize, etc.)
- Screen reader / ARIA support
- Concurrent and Suspense mode
Capabilities
Key Features
- React component model for CLIs
- Flexbox layouts via Yoga engine
- useInput hook for keyboard handling
- usePaste hook with bracketed paste mode
- useFocus and useFocusManager hooks
- useWindowSize hook with resize support
- useBoxMetrics hook for layout metrics
- useCursor hook for IME support
- Screen reader support with ARIA props
- React Concurrent Rendering mode
- Suspense support
- Incremental rendering mode
- Alternate screen buffer support
- Kitty keyboard protocol support
- React Devtools integration
- renderToString for synchronous rendering
- CI-aware rendering
- create-ink-app scaffolding tool
- ink-testing-library for unit testing
- Static component for permanent output
- Transform component for string transformation
- Configurable max FPS
- Custom border styles
- Background color support for Box elements
