Component library / Web + TUI

One component, two renderers.

One shared model drives both web and TUI renderers. The two views are in sync. Reset examples to return both to their starting values. Explore components that work in both web and TUI environments. The same libraries, hooks, functions, data, state, and types drive both; only the rendering component changes. This includes Tanstack libraries like Query, Table, Router etc.

Display

Table

One useTableModel instance owns filtering and a single TanStack Table instance. Both renderers receive the same table, row model, sorting state, and selection.

Web

React DOM
ActiveReview screens
PlannedDraft changes
CompleteCover key flows

Filter rows, click a column heading to sort, and click a record name to select it. Column filters applied in the terminal also filter these rows.

Terminal

Ink + xterm.js

Loading terminal…

Click the terminal. Press / to filter all rows, Alt+1 / Alt+2 / Alt+3 to filter Name / Status / Details, Enter to finish typing, ↑ / ↓ to select, and 1 / 2 / 3 to sort. Use Tab to leave the terminal.

Sorting cycles ascending, descending, and unsorted. Global and column filters combine through the same TanStack Table model. Filtering clears selection. Row IDs keep the selected record linked when the order changes.