A TUI input library supporting multiple backends.
This crate can be used with tui-rs and ratatui.
For people using tui-rs
use version v0.6.*
for people migrating to ratatui
use latest version.
Cargo.toml
# crossterm
tui-input = "*"
# termion
tui-input = { version = "*", features = ["termion"], default-features = false }
- crossterm (default)
- termion
- serde
See examples.
# Run the example with crossterm as backend.
cargo run --example crossterm_input
# Run the example with termion as backend.
cargo run --example termion_input --features termion
# Run the tui-rs example
(cd ./examples/ratatui-input/ && cargo run)