High-Performance Terminal Rendering
Ratatui keeps two buffers and diffs them after every draw, so only changed cells are written to the terminal. Rendering stays fast even when you redraw the whole layout on each tick.
v0.30.2 Latest stable release · June 2026
Ratatui simplifies terminal application development with customizable widgets, flexible layouts, and high-performance rendering, enabling developers to create sophisticated, interactive, and responsive terminal user interfaces in Rust.
Illustrative previews rendered with Ratatui's own widgets. Use the tabs or arrow keys to switch views.
Ratatui is an open-source Rust library for building terminal user interfaces. It provides layouts, styled text and widgets for applications that run in a terminal.
Your application manages its state and input, while Ratatui draws each frame and updates the cells that changed. This approach works well for dashboards, developer tools and interactive applications used locally or over SSH.
Ratatui is the community-maintained continuation of tui-rs. Explore the documentation and examples to get started.
Everything you need to design a terminal interface, from the grid of cells up to complete dashboards.
Ratatui keeps two buffers and diffs them after every draw, so only changed cells are written to the terminal. Rendering stays fast even when you redraw the whole layout on each tick.
Block, Paragraph, List, Table, Tabs, Gauge, LineGauge, Sparkline, Chart, BarChart, Canvas, Scrollbar and Calendar are built in, each configurable through a builder API.

Split areas with Length, Percentage, Ratio, Min, Max and Fill constraints that adapt as the terminal resizes.
Compose Span, Line and Text with ANSI, 256-color or 24-bit RGB colors and modifiers like bold, italic and underline.
The default crossterm backend runs on Windows, Linux and macOS terminals from a single codebase.
Stateful widgets such as List and Table track selection and scrolling while your code reacts to keys and mouse events.
Your application handles input and maintains state. On each draw, Ratatui lays out widgets, renders them into a buffer and sends changed cells to the terminal through a backend such as crossterm.
Use ratatui::run() to initialize and restore the terminal, and update your state in response to keyboard or mouse events.
These steps were tested with Rust 1.97 and Ratatui 0.30.2. Any Rust toolchain from 1.88.0 onward works.
Install the toolchain with rustup, which also installs Cargo. On Windows, download rustup-init.exe from rust-lang.org and accept the Visual Studio build tools prompt.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustc --version # should print 1.88.0 or newerCargo scaffolds a binary crate with src/main.rs and a Cargo.toml manifest.
cargo new ratatui-app
cd ratatui-appcargo add writes the latest compatible version into Cargo.toml with default features enabled.
cargo add ratatui[dependencies]
ratatui = "0.30.2"crossterm is a default feature and is re-exported as ratatui::crossterm, so you do not need a separate dependency. Import events from the re-export to avoid version mismatches.
use ratatui::crossterm::event::{self, Event, KeyCode};To use another backend, disable defaults and pick one feature, for example cargo add ratatui --no-default-features --features termion,all-widgets.
To test unreleased changes, point Cargo at the repository. Pin a commit with rev for reproducible builds.
cargo add ratatui --git https://github.com/ratatui/ratatui[dependencies]
ratatui = { git = "https://github.com/ratatui/ratatui" }Replace src/main.rs with this complete Hello World program. It compiles without warnings on Ratatui 0.30.2.
use ratatui::crossterm::event::{self, Event, KeyCode, KeyEventKind};
use ratatui::widgets::{Block, Paragraph};
use ratatui::{DefaultTerminal, Frame};
fn main() -> std::io::Result<()> {
// ratatui::run() enables raw mode and the alternate screen,
// runs your closure, then restores the terminal (even on panic).
ratatui::run(app)
}
fn app(terminal: &mut DefaultTerminal) -> std::io::Result<()> {
loop {
terminal.draw(render)?;
if let Event::Key(key) = event::read()? {
if key.kind == KeyEventKind::Press && key.code == KeyCode::Char('q') {
return Ok(());
}
}
}
}
fn render(frame: &mut Frame) {
let block = Block::bordered().title(" Hello Ratatui ");
let greeting = Paragraph::new("Hello, World! Press q to quit.")
.centered()
.block(block);
frame.render_widget(greeting, frame.area());
}┌ Hello Ratatui ───────────────────────────┐ │ Hello, World! Press q to quit. │ │ │ │ │ └──────────────────────────────────────────┘
Common installation notes: on Linux, a missing linker error means you need your distribution's build tools (for example build-essential). On Windows, install the "Desktop development with C++" workload. If the screen stays garbled after a crash, run reset (Unix) or close the terminal tab.

Run from a real terminal, not an IDE output pane, because raw mode needs a TTY. Press q to quit.
cargo run
cargo run --release # optimized build for profilingWrite rendering tests with TestBackend, which captures the buffer in memory so you can assert on the exact characters drawn.
The screens below are original illustrative previews built with Ratatui widgets. They show the kinds of tools teams build, not specific published products.

Per-core CPU gauges, process tables and memory meters that refresh every second using a tick-based loop.

Deployment status, rollout progress and event logs in one keyboard-driven screen that works over SSH.

Miller-column navigation with previews, built from lists, tables and paragraphs side by side.

Throughput charts, live connection tables and latency sparklines per interface.

KPI tiles, trend lines and grouped bars for reports that run in the terminal or in CI logs.
Wizards, pickers and fuzzy finders that upgrade a plain CLI with menus, forms and live feedback while staying scriptable.
Browse schemas, run queries and page through result tables without leaving the terminal.
Stage hunks, browse logs and resolve conflicts with diff views and commit graphs.
Canvas and buffer access make roguelikes, puzzles and arcade clones possible.
Chat clients and agents that stream model output into scrollable, styled panes.
Tail, filter and highlight logs or build lightweight editors with community text-area widgets.
Ratatui is a Rust development library, not a standalone desktop application. There is no installer or executable to download; you add the crate to a Rust project and Cargo fetches it. Explore installation and source information on this site.
cargo add ratatuiClone with git clone https://github.com/ratatui/ratatui.git to explore the examples, then run one with cargo run --example followed by its name from the examples folder.
Every release on GitHub lists features, fixes and breaking changes. Read them before bumping a minor version, since Ratatui follows 0.x semantic versioning.
Combine the API reference on docs.rs, concept guides on ratatui.rs and our documentation overview to learn quickly.
With its default crossterm backend, Ratatui supports Windows, Linux and macOS. Other backends include termion, termwiz and termina; termion targets Unix-like systems.
Ratatui 0.30.2 requires Rust 1.88.0 or newer. Terminal color, Unicode and mouse support depend on the terminal emulator. Ratatui gives Rust developers control over rendering and application architecture; alternatives include Bubble Tea for Go and Textual for Python.
If compilation fails, update Rust with rustup update stable and check the release notes for API changes. For dependency conflicts, use cargo tree -d to find duplicate versions.
Run your application in a real terminal. If rendering flickers, avoid printing to standard output while the interface is active. On Windows, filter keyboard events for presses; enable mouse capture explicitly when needed.
For more guidance, visit the documentation.
You'll need Rust 1.88.0 or newer, Cargo and a compatible terminal. A UTF-8 terminal with a font that supports box-drawing characters gives the best results.
Ratatui is open source and MIT licensed. Install it from crates.io or the official GitHub repository, keep dependencies updated and review their licenses. Tools such as cargo audit can check dependencies for known advisories.
Ratatui offers customizable widgets, efficient rendering and cross-platform support. It also requires Rust knowledge and leaves input handling and application state to your code. Terminal capabilities can vary across devices.
Short, accurate answers to the questions developers ask most. Still stuck? Read the documentation guide or contact us.
Browse examplesRatatui is used to build terminal user interfaces (TUIs) in Rust: system monitors, deployment dashboards, file managers, database clients, Git tools, log viewers and small games. It handles layout, styling and efficient rendering, while your program owns the data and the event loop.
Yes. Ratatui is free, open-source software released under the MIT license. The source code is developed in public on GitHub, and every release is published to crates.io.
Install Rust with rustup, create a project with cargo new my-app, then run cargo add ratatui inside the project folder. Cargo downloads the crate and its default crossterm backend the next time you build or run.
Yes. With the default crossterm backend, Ratatui applications compile and run on Windows 10 and 11 consoles such as Windows Terminal and PowerShell, as well as on Linux and macOS. The termion backend is the exception: it targets Unix-like systems only.
Ratatui is the community-maintained continuation of tui-rs. It began as a fork in 2023 when tui-rs stopped receiving updates, and tui-rs was later archived. Ratatui keeps the same immediate-mode design but adds years of fixes, new widgets, a modular crate layout and helpers such as ratatui::run().
Ratatui renders the interface; input comes from the backend. With crossterm you read key, mouse, paste, focus and resize events through ratatui::crossterm::event. Mouse reporting must be switched on with EnableMouseCapture.
Add the crate, copy the Hello World example and you will have a running Ratatui interface in minutes.