23,322
stars
826
forks
60
watchers
2,144
prs
569
issues
138
releases
README
Table of Contents
- Quickstart
- Documentation
- Templates
- Built with Ratatui
- Contributing
- Acknowledgements
- License
!Release header
[![Crate Badge]][Crate] [![Repo Badge]][Repo] [![Docs Badge]][Docs] [![License Badge]][License] \
[![CI Badge]][CI] [![Deps Badge]][Deps] [![Codecov Badge]][Codecov] [![Sponsors Badge]][Sponsors] \
[Ratatui Website] · [Docs] · [Widget Examples] · [App Examples] · [Changelog] \
[Breaking Changes] · [Contributing] · [Report a bug] · [Request a Feature]
[Ratatui][Ratatui Website] (_ˌræ.təˈtu.i_) is a Rust crate for cooking up terminal user interfaces
(TUIs). It provides a simple and flexible way to create text-based user interfaces in the terminal,
which can be used for command-line applications, dashboards, and other interactive console programs.
Quickstart
Ratatui has [templates] available to help you get started quickly. You can use the
[cargo-generate] command to create a new project with Ratatui:
shell
cargo install --locked cargo-generate
cargo generate ratatui/templates
Selecting the Hello World template produces the following application:
rust
use color_eyre::Result;
use crossterm::event::{self, Event};
use ratatui::{DefaultTerminal, Frame};
fn main() - Result {
color_eyre::install()?;
let terminal = ratatui::init();
let result = run(terminal);
ratatui::restore();
result
}
fn run(mut terminal: DefaultTerminal) - Result {
loop {
terminal.draw(render)?;
if matches!(event::read()?, Event::Key(_)) {
break Ok(());
}
}
}
fn render(frame: &mut Frame) {
frame.render_widget("hello world", frame.area());
}
Documentation
- [Docs] - the full API documentation for the library on docs.rs.
- [Ratatui Website] - explains the library's concepts and provides step-by-step tutorials.
- [Ratatui Forum] - a place to ask questions and discuss the library.
- [Widget Examples] - a collection of examples that demonstrate how to use the library.
- [App Examples] - a collection of more complex examples that demonstrate how to build apps.
- [ARCHITECTURE.md] - explains the crate organization and modular workspace structure.
- [Changelog] - generated by [git-cliff] utilizing [Conventional Commits].
- [Breaking Changes] - a list of breaking changes in the library.
You can also watch the [EuroRust 2024 talk] to learn about common concepts in Ratatui and what's
possible to build with it.
Templates
If you're looking to get started quickly, you can use one of the available templates from the
[templates] repository using [cargo-generate]:
shell
cargo generate ratatui/templates
Embedded and no_std
Ratatui also runs on no_std targets such as microcontrollers, using a backend like [Mousefood].
Turning off default features also turns off the layout cache, which matters most on these
targets, so enable it again and size it for the device:
toml
ratatui = { version = "0.30", default-features = false, features = ["layout-cache"] }
See [Using Top issues
#996Rename `render_ref` for `StatefulWidgetRef` to `render_stateful_ref`27 comments · 2024-03-24#1271Fix unicode text width calculation24 comments · 2024-08-03#1468Connecting blocks19 comments · 2024-11-04#779Example code compatibility with Ratatui versions19 comments · 2024-01-10#2397are the mice cheese-starved? memory usage on embedded.18 comments · 2026-02-14#1028Support styling as a hyperlink18 comments · 2024-04-12#2269Notifications feature crate for Ratatui16 comments · 2025-12-15#1855Ratatui hangs / high cpu: Resolving Layout constraints might loop indefinitely.16 comments · 2025-05-14
Discussions
#2916Show and Tell: r/RatatuiRust - a community for Ratatui developers0 comments · 2026-11-15#2806WebAssembly plugin widgets for Ratatui1 comments · 2026-10-03#2729New release discussion1 comments · 2026-08-23#2690Ratlings: small exercises to learn Ratatui5 comments · 2026-08-04#2689Exporting a rendered Buffer to a static image (SVG), for documentation1 comments · 2026-08-04#2682Why not use char instead of CompactString for Cell symbol?1 comments · 2026-07-30#2650Why does the combination of Inline Viewport and warp's Paragraph cause continuous printing of new lines?1 comments · 2026-07-16#2888a11y support22 comments · 2026-06-19
Latest release
ratatui-v0.30.2 ratatui-v0.30.2 2026-06-19!a gift
We are excited to announce the new version of ratatui - a Rust library that's all about cooking up TUIs 👨🍳🐀
✨ Release highlights:
⚠️ List of breaking changes can be found here.
Features
- 90639c1 (uncategorized) Add Termina backend by @joshka in 2561
Summary
- add the ratatui-termina backend crate using the published termina
crate
- expose the backend through the termina feature and Ratatui
prelude/backend re-exports
- add a small Termina event-loop example and wire the backend into CI,
xtask, README generation, and docs
Refs 1784
Validati