TUI Libraries Catalog
A breadth-first survey of terminal user interface (TUI) libraries across programming languages. This catalog covers rendering models, architecture patterns, and abstraction levels to inform the design of TUI capabilities for Sparkles.
Rust
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Ratatui | Immediate | App-driven loop | Mid-level | Active | repo · docs |
| Cursive | Retained | Callback-based | High-level | Maintained | repo · docs |
| Crossterm | N/A (backend) | Imperative | Low-level | Active | repo · docs |
| Termion | N/A (backend) | Imperative | Low-level | Maintained | repo |
| Termwiz | Immediate | Imperative | Mid-level | Active | repo |
| Dioxus TUI | Retained | React-like | High-level | Experimental | repo |
Python
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Textual | Retained | CSS + widgets | High-level | Active | repo · docs |
| Rich | Immediate | Render-to-console | Mid-level | Active | repo · docs |
| Urwid | Retained | Widget tree | Mid-level | Maintained | repo · docs |
| npyscreen | Retained | Form-based | High-level | Unmaintained | repo |
| prompt_toolkit | Retained | Component-based | Mid-level | Active | repo · docs |
| curses (stdlib) | Immediate | Imperative | Low-level | Stable | docs |
JavaScript / TypeScript
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Ink | Retained | React components | High-level | Active | repo |
| Blessed | Retained | Widget tree | High-level | Unmaintained | repo |
| Neo-blessed | Retained | Widget tree | High-level | Low activity | repo |
| Terminal Kit | Hybrid | Imperative + widgets | Mid-level | Maintained | repo |
| Yoga (layout) | N/A (layout engine) | Flexbox | Low-level | Active | repo |
Neovim / Lua
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Snacks.nvim | Retained (buffers/windows) | Event-driven plugin suite | High-level | Active | repo · docs |
Go
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Bubble Tea | Immediate | Elm / MVU | Mid-level | Active | repo |
| Lip Gloss | N/A (styling) | Builder pattern | Mid-level | Active | repo |
| Bubbles | Immediate | MVU components | Mid-level | Active | repo |
| tview | Retained | Widget tree | High-level | Active | repo |
| gocui | Retained | View-based | Mid-level | Maintained | repo |
| tcell | N/A (backend) | Imperative | Low-level | Active | repo |
| Termbox-go | N/A (backend) | Imperative | Low-level | Archived | repo |
Haskell
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Brick | Retained | Pure functional / declarative | High-level | Active | repo · docs |
| Vty | Immediate | Imperative | Low-level | Active | repo |
C / C++
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Notcurses | Retained (planes) | Imperative + planes | Mid-level | Active | repo · docs |
| ncurses | Immediate | Imperative | Low-level | Stable | docs |
| FTXUI | Immediate | Functional components | Mid-level | Active | repo |
| ImTui | Immediate | Dear ImGui for terminal | Mid-level | Maintained | repo |
| CDK | Retained | Widget-based | High-level | Maintained | docs |
| Termbox2 | N/A (backend) | Imperative | Low-level | Active | repo |
D
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Scone | Immediate | Imperative | Low-level | Archived | repo |
| Arsd terminal | Hybrid | Imperative + widgets | Mid-level | Active | repo |
| Nice | N/A (backend) | Imperative | Low-level | Unmaintained |
Java / Kotlin
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Lanterna | Retained | Widget tree | High-level | Maintained | repo |
| JLine | N/A (line editing) | Imperative | Low-level | Active | repo |
| Mosaic | Retained | Compose-like | High-level | Active | repo |
Ruby
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| TTY | Hybrid | Component toolkit | Mid-level | Maintained | repo |
| Curses (gem) | Immediate | Imperative | Low-level | Maintained | repo |
Zig
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Tuile | Immediate | Functional | Mid-level | Archived | |
| zbox | Immediate | Ratatui-inspired | Mid-level | Archived | |
| libvaxis | Immediate | Imperative | Low-level | Active | repo |
Nim
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Illwill | Immediate | Imperative | Low-level | Maintained | repo |
| nimbox | Immediate | Termbox binding | Low-level | Unmaintained | repo |
OCaml
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Nottui | Retained | Functional reactive | Mid-level | Maintained | repo |
| Lambda-term | Retained | Widget tree | Mid-level | Maintained | repo |
Clojure
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Clansi | N/A (styling) | Functional | Low-level | Maintained | repo |
| clojure-lanterna | Retained | Wrapper | Mid-level | Unmaintained | repo |
Scala
| Library | Rendering Model | Architecture | Abstraction | Status | Links |
|---|---|---|---|---|---|
| Fansi | N/A (styling) | Functional | Low-level | Maintained | repo |
Architectural Taxonomy
By Rendering Model
| Model | Description | Libraries |
|---|---|---|
| Immediate | Application redraws entire UI each frame; framework diffs or flushes | Ratatui, FTXUI, ImTui, Bubble Tea, ncurses |
| Retained | Framework maintains widget tree; updates propagate automatically | Textual, Brick, Blessed, Ink, Cursive, tview, Lanterna, Notcurses (planes) |
| Hybrid | Mix of retained state with explicit render calls | Terminal Kit, arsd terminal, TTY |
By Architecture Pattern
| Pattern | Description | Libraries |
|---|---|---|
| Elm / MVU | Model-View-Update loop with messages | Bubble Tea, Brick (partially) |
| React / Component | Declarative components with props, reconciliation | Ink, Dioxus TUI, Mosaic |
| Pure Functional | Immutable state, declarative combinators | Brick, Nottui |
| Widget Tree | Mutable tree of widget objects | Textual, Cursive, tview, Urwid, Lanterna, Blessed |
| Imperative | Direct terminal manipulation | ncurses, Crossterm, tcell, Termbox |
| Functional Components | Stateless functions returning UI trees | FTXUI |
By Layout Approach
| Approach | Description | Libraries |
|---|---|---|
| CSS / Flexbox | Web-inspired box model and flex layout | Textual (CSS subset), Ink (Yoga/flexbox) |
| Constraint-based | Size constraints flow through widget tree | Ratatui, Brick, tview |
| Combinators | Compositional layout via functional combinators | Brick (hBox, vBox, padded) |
| Manual / Absolute | Explicit coordinates and sizes | ncurses, Notcurses (planes), Termbox |
| Declarative Splits | Layout DSL with percentage/fixed splits | Ratatui (Layout::default().constraints([...])) |
Detailed Studies
The following libraries are analyzed in depth:
- Ratatui — Rust immediate-mode TUI with constraint-based layout
- Ink — React for the terminal (JavaScript)
- Textual — CSS-styled retained-mode framework (Python)
- Bubble Tea — Elm Architecture for terminals (Go)
- Brick — Pure functional declarative TUI (Haskell)
- Notcurses — Modern ncurses successor (C)
- FTXUI — Functional DOM-like components with flexbox layout (C++)
- Cursive — Retained-mode callback-based view hierarchy (Rust)
- Mosaic — Jetpack Compose runtime for terminals (Kotlin)
- Nottui — Incremental computation / functional reactive TUI (OCaml)
- libvaxis — comptime-powered, allocator-aware terminal library (Zig)
- tview — Retained widget tree with flex layout (Go)
- ImTui — Dear ImGui paradigm adapted for terminals (C++)
- Snacks.nvim — Neovim UI toolkit built on floating windows and layouts
Comparative & Specialized Studies
See the Comparison for cross-library synthesis and design recommendations for Sparkles.
See the Tree-View Case Study for a focused analysis of tree-view implementations across 13 libraries, including detailed studies of snacks.nvim, ratatui, Textual, Rich (Python), broot, cursive_tree_view (Rust), and stlab::forest (C++).