Registry / utility / ansi-to-tui

ansi-to-tui

JSON →
library8.0.1rscratesunverified

Convert ANSI color and style codes into Ratatui Text.

# Cargo.toml [dependencies] ansi-to-tui = "8.0.1"
INSTALL
IMPORT
SIG · ANSI-TO-TUI
A
ansi-to-tui
utilityrustv8.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ansi_to_tui
use ansi_to_tui::ansi_to_tui;

Converts an ANSI string into Ratatui Text.

use ansi_to_tui::ansi_to_tui; fn main() { let input = "\x1b[31mRed text\x1b[0m"; let text = ansi_to_tui(input).unwrap(); println!("Converted: {:?}", text); }
Debug
Known issues
gotchaRequires the `ratatui` crate for the Text type.
fix
Add ratatui to Cargo.toml.
affects: >=8.0.0
Upgrade
Version history
8.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
18
OpenAI (training)
3
Meta
1
Amazon
1
Resources
ansi-to-tui — cargo add ansi-to-tui · libregistry