Getting Started

Install @visulima/tui and choose the right rendering mode for your project

Getting Started

@visulima/tui supports three runtime modes.

ModePrimary APIImport pathBest for
React moderender(<App />)@visulima/tui/reactComponent-driven TUIs with hooks and Yoga layout
Raw-buffer modeRenderer + renderer.render@visulima/tui/coreDirect per-cell rendering and custom loops
Inline moderenderInline / createInlineLoop@visulima/tui/react / @visulima/tui/coreFixed-height UI below the cursor

Install

React apps (most users)

npm install @visulima/tui react

Raw-buffer / non-React apps

npm install @visulima/tui

@visulima/tui/core is a TypeScript-facing runtime with a native Rust diff/render engine. React is an optional peer dependency.

Requirements

  • Node.js: 20.19 or higher

Run examples in this repository

# React mode
node --import @oxc-node/core/register examples/kitchen-sink.tsx
node --import @oxc-node/core/register examples/counter.tsx

# Raw-buffer mode
node --import @oxc-node/core/register examples-raw/matrix.ts
node --import @oxc-node/core/register examples-raw/conway.ts

# Inline mode (React)
node --import @oxc-node/core/register examples/inline-minimal.tsx

See Examples for the full list.

Ink migration (typical)

- import { render, Box, Text } from 'ink'
+ import { render, Box, Text } from '@visulima/tui/react'

Most app-level API usage maps directly. See Ink Compatibility for caveats and stubs.

Next Steps

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues