Ratatui is a Rust crate for building text-based terminal user interfaces. It suits command-line tools, dashboards, and other interactive console programs that need structured layouts and widgets.
Overview
Ratatui helps Rust developers render rich interfaces inside a terminal using widgets, styling, and layout primitives. It continues development from the earlier tui-rs project and targets programs that run entirely in the console.
The API includes blocks, paragraphs, tables, charts, gauges, lists, and related widgets, with constraint-based layouts that adapt as the terminal resizes. Documentation, tutorials, widget examples, and starter templates are available for new projects.
Projects can scaffold quickly through cargo-generate templates. For embedded or nostd targets, Ratatui can run with backends such as Mousefood, with optional layout cache configuration for constrained devices.
A community showcase lists applications built with the crate, spanning monitoring tools, games, data viewers, and API browsers. Forum, chat, and issue trackers support questions and feature requests.
Key features
- Widget set for charts, tables, and lists
- Constraint-based responsive layouts
- Styling and bordered blocks
- cargo-generate project templates
- nostd and embedded target support
- Immediate-mode terminal rendering
- Documentation and widget examples
- Fork successor to tui-rs
Use cases
- CLI dashboards and monitoring tools
- Interactive terminal games
- Data and log viewers in the shell
- Embedded console interfaces
- OpenAPI and API exploration TUIs