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.

Interaction

Command palette

The page’s live command registry supplies the same actions to the page palette and these previews. One useCommandPaletteModel instance handles search, ordering, selection, and execution for both renderers.

Web

React DOM

No commands found.

Search commands, use ↑ / ↓ to highlight one, and press Enter to run. You can also click a command.

Terminal

Ink + xterm.js

Loading terminal…

Click the terminal. Press / to search, ↑ / ↓ to select, and Enter to run. Esc returns to navigation mode. Use Tab to leave the terminal.

CommandPalette come from the page’s live registry. Running a command invokes its real page action. Search and selection are shared between these previews and remain separate from the page’s modal palette.