-
Notifications
You must be signed in to change notification settings - Fork 163
Architecture
Karanjot786 edited this page Jun 1, 2026
·
1 revision
TermUI is a Bun monorepo with 13 packages. Each package has one job.
| Package | Job |
|---|---|
@termuijs/core |
Layout engine, renderer, terminal I/O, input parser, App lifecycle |
@termuijs/widgets |
Display widgets: Box, Text, Table, charts, badges, progress |
@termuijs/ui |
Interactive components: Select, Form, Modal, Tabs, AppShell |
@termuijs/jsx |
JSX runtime and React-style hooks |
@termuijs/store |
Global signal-based state |
@termuijs/tss |
Theming and style tokens |
@termuijs/motion |
Animations and the timer pool |
@termuijs/router |
Path-based screen routing |
@termuijs/data |
Real-time data providers (CPU, memory, disk) |
@termuijs/testing |
Headless render harness for tests |
@termuijs/dev-server |
Hot-reload dev server |
@termuijs/quick |
Convenience re-exports for fast setup |
create-termui-app |
Project scaffolding CLI |
- Your component tree builds a layout node tree.
- The layout engine resolves positions and sizes with flexbox rules.
- Widgets write cells to a back buffer.
- The differential renderer compares front and back buffers.
- Only changed cells emit ANSI escape sequences to stdout.
This keeps redraws small. A stable frame writes zero bytes.
@termuijs/core reads the terminal environment at startup. It detects Unicode support, color depth, and TTY state. Widgets check caps.unicode before drawing box characters and fall back to ASCII when needed.
-
coredepends on nothing internal. -
widgetsdepends oncore. -
uidepends oncoreandwidgets. -
jsxdepends oncore. - Everything else builds on these.
Keep this direction. A package must not import from one that sits above it.