Expand description
Render Ratatui frames through a termina::Terminal.
TerminaBackend writes Termina CSI/SGR escape sequences for Ratatui’s Backend contract:
drawing cells, moving and querying the cursor, clearing regions, flushing output, and reading
terminal size. It wraps a caller-provided termina::Terminal, so applications can keep using
Termina’s event reader and typed terminal protocol surface alongside Ratatui rendering.
The Termina crate is re-exported as ratatui_termina::termina, so callers can use the same
Termina types as the backend.
The backend does not enter raw mode, switch to the alternate screen, enable bracketed paste, or
install cleanup by itself. Configure those terminal modes with Termina before creating the
backend and restore them when the session ends. The termina example in this crate shows the
direct setup path with a small key-event loop.
§Features
serde— Reserved for serde compatibility. Termina currently has no serde feature.underline-color(enabled by default) — Enables SGR underline-color writes from cell underline colors.scrolling-regions— Enables terminal scrolling regions for Terminal::insert_before.
The following features are unstable and may change in the future:
unstable— Enable all unstable features.unstable-backend-writer— Enables accessors for the wrapped terminal.
Re-exports§
pub use termina;
Structs§
- Termina
Backend - A
Backendimplementation that renders through atermina::Terminal.
Traits§
- From
Termina - A trait for converting a Termina type to a Ratatui type.
- Into
Termina - A trait for converting a Ratatui type to a Termina type.