ratada
A reusable ratatui widget toolkit for Rust terminal apps.
ratada provides the generic building blocks for a TUI over ratatui and
crossterm: a terminal guard and event loop, modals, forms, text editing,
pickers, tables, trees, a fuzzy finder, a help overlay, footers and status
bars, plus a framework-agnostic theming layer (colors, palette, glyphs and
layout mode) that maps onto ratatui styles.
Overview
- Driver – a
TuiRAII terminal guard (raw mode + alternate screen) and a genericrunloop over aScreentrait. - Widgets – modals (
confirm,select,multi_select,number_input,message), forms, single- and multi-line text editing with a shared editor core, autocomplete, tables, trees, tabs, pagers, gauges, spinners, toasts. - Pickers – color, date, date-range, month and path pickers.
- Theming – a
Skinbundling aPalette(semantic colors),Glyphs(Unicode/ASCII variants) and a layoutMode; framework-agnostic so a CLI can share it, with a single ratatui adapter instyle.
Usage
[]
= "0.0.1"
Implement the Screen trait and hand it to run, which owns the draw/input
loop inside a raw-mode Tui guard. The prelude re-exports the driver
essentials:
use *;
use ;
use ;
Widgets that support the opt-in boxed style take a BoxDecor (caption in the
top border, an automatic or fixed badge bottom-right), e.g.
InputField::new("").max_len(40).boxed(BoxDecor::new().caption("Name")).
Documentation
API.md— a compact index of the public surface (rustdoc viacargo doc --openis the authoritative reference).DEVELOPMENT.md— module layout, conventions and how to add a widget.CLAUDE.md— the binding style guide.
License
MIT