ratatui /ratatui

A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

★ 23,322⑂ 826👁 60⑃ 2,144● 569▤ 138
RustMITCreated 2023-02-12ratatui.rs
Download: ratatui-v0.30.2ratatui-v0.30.2 ↓0.30.22026-06-19
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

Discussions

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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON