ratatui

Solid

Build terminal UIs in Rust with Ratatui. Use when creating TUI applications, immediate-mode rendering, high-performance terminal interfaces, or production Rust CLIs.

Web & Frontend 91 stars 6 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
65
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 1. **Add dependencies** to `Cargo.toml` (ratatui + crossterm) 2. **Define App state struct** — holds all mutable data (selected index, input buffer, etc.) 3. **Initialize terminal** — enable raw mode, enter alternate screen 4. **Main event loop** — `terminal.draw(|f| ui(f, &app))` + `event::poll` + key handler 5. **Build UI function** — `Layout::split` → assign chunks → `render_widget` per chunk 6. **Teardown** — disable raw mode, leave alternate screen on exit or panic ## Dependencies ```toml [dependencies] ratatui = "0.28" crossterm = "0.28" ``` ## Basic Application ```rust 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: KeyC...

Details

Author
FlorianBruniaux
Repository
FlorianBruniaux/ccboard
Created
6 months ago
Last Updated
1 weeks ago
Language
Rust
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

ratatui

Use this skill for any task involving a Rust terminal/text user interface (TUI) built with Ratatui (or crossterm), whether creating one or debugging, fixing, testing, or extending an existing one. Covers: scaffolding the initial `main`/render loop and terminal setup; fixing teardown so a panic or crash doesn't leave the terminal in raw mode / broken; laying out panels, sidebars, status bars, dashboards, and popups with Layout/Constraint; wiring widgets like List, Table, Gauge, Chart, Scrollbar (including selection/scroll state that won't move); styling, text wrapping, and Unicode width issues; streaming LLM/async output into a terminal; and unit-testing rendered output without a real terminal. Triggers on "rust + terminal app/UI/dashboard", ratatui, crossterm. Writes current Ratatui 0.30+ code, not stale tui-rs patterns. Not for: Go TUIs (Bubble Tea), Python TUIs (Textual), non-interactive CLI output or progress bars, web/browser UIs, image-to-ASCII art (ascii/textmode), or tmux/agent-session orchestration.

1 Updated 3 weeks ago
vinsonconsulting
Web & Frontend Solid

ratatui-patterns

Modern-ratatui knowledge pack for Rust TUI code on ratatui or crossterm. Use when touching TUI widgets, layout, styling, or event loops, writing TestBackend render tests, or resolving ratatui upgrades and API questions.

5 Updated 5 days ago
uwuclxdy
Web & Frontend Listed

tui-design

Design, build, refactor, or review terminal interfaces—full-screen TUIs, interactive prompts, and command-line tools. Use for terminal-app layout and UX, CLI behavior, ncurses-style tools, dashboards, REPLs, fzf-like pickers, and libraries such as Bubble Tea, Ratatui, Textual, or Ink, including requests that name a known TUI such as lazygit, k9s, btop, helix, or yazi instead of saying “TUI.” Do not use for browser or web UI, native GUI, editor or font configuration, or backend and shell work that has no terminal interface.

18 Updated 2 days ago
gfargo