termino
~/docs/custom

Custom components

Built on @opentui/react — composition over inheritance. No native code, no extend() ceremony: every component below is a plain function component using <box>, <text>, and the useKeyboard / useTimeline hooks. Source in lib/custom/, runnable in examples/custom/.

~/components/data-viz

11

Charts and plots rendered in character cells — line, bar, pie, gauge, heatmap and more.

~/components/feedback

3

Progress, status and notification primitives that keep the user informed.

~/components/input

3

Keyboard-driven interactive controls: editors, trees, dialogs.

~/components/layout

2

Structural helpers for arranging terminal UI.

~/components/display

1

Presentational one-offs that render read-only content.

~/components/agentic

6

Building blocks for AI-agent CLIs: spinners, tool calls, approvals, token meters.

##Usage pattern

Components import like any React module. Stateful ones (Toast, Modal) expose context or props; presentational ones (Badge, Sparkline, ProgressBar) render from props only:

tsxapp.tsx
1import { createCliRenderer } from "@opentui/core"
2import { createRoot } from "@opentui/react"
3import { Badge, ProgressBar, ToastProvider } from "termino"
4
5function App() {
6 return (
7 <box border title="dashboard" style={{ padding: 2, flexDirection: "column", gap: 1 }}>
8 <box flexDirection="row" gap={1}>
9 <Badge label="prod" tone="red" />
10 <Badge label="ready" tone="green" prefix="● " />
11 </box>
12 <ProgressBar label="deploy" value={64} />
13 </box>
14 )
15}
16
17const renderer = await createCliRenderer()
18createRoot(renderer).render(
19 <ToastProvider>
20 <App />
21 </ToastProvider>,
22)

Run any example in a real terminal:

bashterminal
1$ bun examples/custom/tree-view.tsx # keyboard tree
2$ bun examples/custom/progress-bar.tsx # animated bars
3$ bun examples/custom/toast.tsx # space to push toasts