TUI
Ink components for terminal apps a person and an agent run together: the components, the terminal habits that differ from the browser, surfaces with action policies, and the MCP bridge.
0/4 lessons
0%
What fancy-tui is
~7 min
@particle-academy/fancy-tui is a set of Ink components for terminal apps that a person and an agent use together. It needs Node 22, React 19.2 and Ink 7.
The vocabulary will feel familiar from the browser kit: layout (Box, Stack, Panel, Screen, StatusBar), inputs (Input, MultilineInput, Select, Checkbox, Form), navigation (Tabs, Menu, Modal, Command), data (Table, TreeNav, FileBrowser) and content (Markdown, CodeView, MessageList, Composer). Wrap the app in FancyTuiProvider, which mounts mouse support unless you pass mouse={false}.
Two differences from plain Ink bite on day one:
- Every interactive component requires an
id. That id is its stable handle, the terminal's answer to adata-*handle in the browser. - Components claim focus on mount by default, the opposite of Ink's own
useFocusdefault. Ink's focus manager is first-come, so moving focus later (opening a modal, switching panes) takes an explicitfocus(id)throughuseFocusManager.
