
ratatui
The Rust library for fast, widget-rich terminal user interfaces
Replaces —

Who it's for
Ratatui provides charts, gauges, tables, and sparklines that update in real time, making it suited for system monitoring tools, deployment status views, and log inspection interfaces. The constraint-based layout keeps the UI legible across different terminal sizes without code changes.
You need a dashboard accessible in a browser or over HTTP. Terminal tools require SSH access or local installation; web-based dashboards serve a different audience.
Interactive menus, searchable lists, and multi-panel layouts are common patterns in DevOps tooling, similar to k9s-style interfaces for managing infrastructure. Ratatui provides the widget primitives for those patterns without requiring a GUI framework or web stack.
Your target users are not comfortable with terminal environments or expect a desktop GUI. TUI tools assume command-line familiarity.
Ratatui's rendering loop and event model map naturally to game-loop patterns. The showcase includes terminal games, oscilloscopes, and music visualizers. The rendering is fast enough for smooth animation in character-cell terminals.
Your project requires pixel graphics, OpenGL, or Vulkan contexts. Ratatui renders in character cells only; graphics beyond what a terminal can display are outside its scope.
The no_std compatibility mode allows Ratatui to target microcontrollers and embedded environments that have some form of character-cell display output but no full standard library. This is unusual among TUI libraries, most of which require a complete OS environment.
Your embedded target has no terminal or display output at all. Ratatui requires a character-cell output surface to render to.
The problem
Building interactive terminal applications in Rust requires solving three related problems at once: handling terminal resizing without breaking layouts, avoiding render flicker from naive write approaches, and keeping the deployment artifact small enough to distribute easily. The traditional answer has been ncurses, a C library that requires foreign function interface bindings, carries C dependency baggage, and produces code that is harder to reason about in a memory-safe language. Commercial GUI frameworks are the other path teams reach for when they need interactive developer tooling: Electron ships a Chromium instance with every application, and Qt requires licensing consideration for commercial use. Both carry significant runtime weight and are inappropriate for server-side tools, SSH sessions, embedded targets, and situations where a single binary is the right artifact. The result is that many developer tools end up with static output and flag-based interaction instead of live dashboards and interactive menus that would better serve users.
How it works
Ratatui writes only the terminal cells that changed between frames, avoiding full-screen rewrites that cause flicker in naive terminal apps. The double-buffer approach gives sub-millisecond draw calls even with complex layouts and many widgets on screen simultaneously.
Charts, sparklines, tables, gauges, scrollable lists, progress bars, and more. Each widget is composable: you can stack and nest them inside constraint-based layout containers. The widget examples repository on GitHub shows available combinations.
Layouts adapt to any terminal size using a system similar to CSS Flexbox: horizontal and vertical splits, percentage-based sizing, and minimum/maximum cell constraints. A dashboard built with Ratatui renders correctly in a 40-column tmux pane and in a full-screen terminal window without code changes.
No ncurses, no FFI bindings, no undefined behavior at the language boundary. Memory-safe, thread-safe, and type-safe by design. Compiles to efficient native code. The entire rendering stack is Rust, which means Cargo handles the full dependency graph without platform-specific library management.
Ratatui supports no_std mode, making it usable on microcontrollers and other embedded environments where the Rust standard library is not available. This sets it apart from most TUI libraries, which require a full OS environment.
Run `cargo generate ratatui/templates` to scaffold a new project. The Hello World template produces a working event loop with rendering in under 40 lines of Rust, including terminal initialization, the draw callback, and cleanup on exit.
Features
- Immediate-Mode Rendering
- Widget Library
- Constraint-Based Responsive Layouts
- Pure Rust, No C Dependencies
- no_std Compatibility for Embedded Targets
- cargo-generate Project Templates
How to install
Install the cargo-generate tool, then scaffold a new Ratatui project from the official templates.
cargo install --locked cargo-generate
cargo generate ratatui/templatesRecommended for this setup
Strengths
- MIT License with No Commercial Restrictions: Ratatui is MIT licensed. You can include it in commercial products, modify it, fork it, and distribute it without copyleft obligations. Unlike AGPL-licensed libraries, there is no requirement to release modifications when you run a modified version as a service.
- 47.1 Million Downloads and 5,600+ Downstream Crates: The download count and the number of crates that list ratatui as a dependency are concrete signals of ecosystem health. A library this widely used has well-documented edge cases, active community support, and API patterns tested against real production workloads.
- Single Binary Distribution: Ratatui is a compile-time dependency. Applications built with it ship as a single native binary with no separate runtime, no interpreter, and no external library to install on the target machine. Distribution to servers, CI systems, and end users is straightforward.
- Active Development Since the 2023 Fork: Ratatui was forked from tui-rs in February 2023 to continue active maintenance. The repo is now at version 0.30.2, with the most recent push on September 1, 2026. Community infrastructure includes Discord, Matrix, and a Discourse forum, indicating structured support rather than a solo-maintainer project.
Trade-offs
- Rust-Only: No Cross-Language Support: Ratatui is a Rust library. Teams not already writing Rust cannot adopt it without a language commitment. Python developers have Rich and Textual; Go developers have Bubbletea; Node.js developers have Blessed. Ratatui is the right TUI library for Rust projects, not a cross-ecosystem option.
- Immediate-Mode Requires a Different Mental Model: Ratatui uses immediate-mode rendering: your application redraws the full UI every frame by calling render functions. Developers familiar with retained-mode frameworks (React, Qt, GTK) need to adjust. There is no automatic widget state management; you manage application state and trigger redraws explicitly.
- 223 Open Issues at Time of Review: With 22,472 stars and 223 open issues, some edge cases and widget behaviors are still being addressed. For production use, check the issue tracker for anything that intersects your specific widget choice or terminal backend.
Tech stack
FAQ
Yes. Ratatui is MIT licensed, which permits commercial use, modification, and distribution without restrictions. You do not need a paid license and there is no commercial tier requirement. Include the MIT LICENSE file in distributions of your application and you are compliant.
Ratatui was forked from tui-rs in February 2023 because tui-rs was no longer actively maintained. Ratatui carries forward the same API shape but has received substantial development since the fork, now at version 0.30.2. New Rust TUI projects should use Ratatui; tui-rs is unmaintained.
Install cargo-generate and run `cargo generate ratatui/templates`. Select the Hello World template to get a working event loop and render function in under 40 lines. The ratatui.rs website has step-by-step tutorials, and the full API reference is available on docs.rs.
Yes. Ratatui supports Windows, Linux, and macOS through its backend crates. Crossterm is the default backend and provides cross-platform terminal control without platform-specific code in your application.
Notable examples include binsider (binary analysis tool, 4.4k GitHub stars), csvlens (CSV viewer, 3.9k stars), oxker (Docker TUI, 1.8k stars), openapi-tui (OpenAPI browser, 1.3k stars), and rebels-in-the-sky (P2P terminal game). Over 5,600 crates on crates.io list Ratatui as a dependency.