ratatui
Skill96 starsChanged 7 months agoMITView on GitHub
Build terminal UIs in Rust with Ratatui. Use when creating TUI applications, immediate-mode rendering, high-performance terminal interfaces, or production Rust CLIs.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- a-poor/skillstheir own version, first seen Aug 20, 2026
- Odonno/doc2skilltheir own version, first seen Aug 1, 2026
- ZhangHanDong/ratatui-skillstheir own version, first seen Jan 19, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ZhangHanDong/ratatui-skills★ 4same name
- Odonno/doc2skill★ 1same name
- a-poor/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- backend-architectSkill
- ccboard-rememberSkill
- code-simplifierSkill
- cybersecSkill
- design-patternsSkill
- issue-triageSkill
- performanceSkill
- pr-triageSkill
- rust-expertSkill
- rust-patternsSkill
- security-guardianSkill
- shipSkill
- tdd-rustSkill
The file
Files
Ratatui (Rust TUI)
Immediate-mode terminal UI framework for Rust using Crossterm backend.
When to Use
- Creating a new TUI application from scratch in Rust
- Adding an interactive terminal interface to an existing CLI tool
- Implementing tabbed navigation, lists, tables, or charts in the terminal
- High-performance terminal rendering where latency matters (e.g., monitoring dashboards)
Keywords: TUI, terminal UI, ratatui, crossterm, interactive CLI, dashboard, ncurses alternative
Workflow
- Add dependencies to
Cargo.toml(ratatui + crossterm) - Define App state struct — holds all mutable data (selected index, input buffer, etc.)
- Initialize terminal — enable raw mode, enter alternate screen
- Main event loop —
terminal.draw(|f| ui(f, &app))+event::poll+ key handler - Build UI function —
Layout::split→ assign chunks →render_widgetper chunk - Teardown — disable raw mode, leave alternate screen on exit or panic
Dependencies
[dependencies]
ratatui = "0.28"
crossterm = "0.28"Basic Application
use crossterm::{
event::{self, Event, KeyCode},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use ratatui::{backend::CrosstermBackend, widgets::{Block, Borders, Paragraph}, Terminal};
use std::io;
struct App {
counter: i32,
}
impl App {
fn new() -> App {
App { counter: 0 }
}
fn on_key(&mut self, key: KeyCode) {
match key {
KeyCode::Up => self.counter += 1,
KeyCode::Down => self.counter -= 1,
_ => {}
}
}
}
fn main() -> Result<(), io::Error> {
enable_raw_mode()?;
let mut stdout = io::stdout();
execute!(stdout, EnterAlternateScreen)?;
let backend = CrosstermBackend::new(stdout);
let mut terminal = Terminal::new(backend)?;
let mut app = App::new();
loop {
terminal.draw(|f| {
let block = Block::default().title("Counter").borders(Borders::ALL);
let paragraph = Paragraph::new(format!("Count: {}", app.counter)).block(block);
f.render_widget(paragraph, f.area());
})?;
if let Event::Key(key) = event::read()? {
match key.code {
KeyCode::Char('q') => break,
code => app.on_key(code),
}
}
}
disable_raw_mode()?;
execute!(terminal.backend_mut(), LeaveAlternateScreen)?;
Ok(())
}Event Loop with Polling
use std::time::Duration;
fn run_app<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -> io::Result<()> {
loop {
terminal.draw(|f| ui(f, app))?;
if event::poll(Duration::from_millis(100))? {
if let Event::Key(key) = event::read()? {
match key.code {
KeyCode::Char('q') => return Ok(()),
KeyCode::Up => app.increment(),
KeyCode::Down => app.decrement(),
_ => {}
}
}
}
}
}Layout
use ratatui::layout::{Constraint, Direction, Layout};
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([
Constraint::Length(3), // Fixed height
Constraint::Min(0), // Fill remaining
Constraint::Length(1), // Status bar
])
.split(f.area());References
- Widgets: See references/widgets.md for List, Table, Paragraph, Gauge
- Best Practices: See references/best-practices.md for keyboard, accessibility, performance
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

