Skip to content

Ratatui

Ratatui

Ratatui Logo
Ratatui Logo

Cook up delicious

terminal user interfaces.

Ratatui is a Rust library for building fast, lightweight, and rich terminal user interfaces

GitHubDiscordMatrixDiscourseX.comBlueskyMastodonLinkedIn
use ratatui::style::Stylize;
use ratatui::widgets::{Block, Paragraph};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    ratatui::run(|terminal| {
        terminal.draw(|frame| {
            let block = Block::bordered().title("Welcome");
            let greeting = Paragraph::new("Hello, Ratatui! 🐭")
                .centered()
                .yellow()
                .block(block);
            frame.render_widget(greeting, frame.area());
        })?;
        std::thread::sleep(std::time::Duration::from_secs(5));
        Ok(())
    })
}

Trusted by {developers} building amazing apps

Create powerful TUIs, interactive dashboards, command-line games, and modern terminal experiences with ease.

Powering industry leaders:

Watch and learn Ratatui

Watch our "recipes" for learning how to cook up TUIs, get inspired by other developers, and join conversations that spark new ideas.

Cooked to perfection 🍲

Sub-millisecond rendering with zero-cost abstractions and immediate-mode rendering. Build responsive dashboards and complex terminal applications that feel instant, even with many widgets on screen. No runtime overhead, just pure Rust performance.

Everything you need to craft professional TUIs: charts, sparklines, tables, gauges, scrollable lists, progress bars, and more. Mix and match widgets to create interactive dashboards, monitoring tools, games and more. Check out the widget examples to see what's possible.

Your UI looks great whether it's in a tiny tmux pane or a big terminal. Constraint-based responsive layouts that automatically adapt to any terminal size. Build complex nested layouts with horizontal and vertical splits, automatically sized containers, and percentage-based constraints. (Think Flexbox, but for the terminal.)

Memory-safe, thread-safe, and type-safe by design. No C dependencies, no runtime exceptions, no undefined behavior. Just pure Rust goodness that compiles to efficient native code. Now supports embedded targets with no_std compatibility too!

Ready to start cooking?

Join thousands of {rats} cooking up the next generation of terminal applications.

Rat icon