20 releases (10 breaking)
0.11.0 | Oct 25, 2024 |
---|---|
0.9.0 | Jun 29, 2024 |
0.8.0 | Aug 7, 2023 |
0.7.1 | May 23, 2023 |
0.1.2 | Nov 4, 2021 |
#29 in Command-line interface
42,198 downloads per month
Used in 78 crates
(74 directly)
28KB
662 lines
tui-input
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.
Install
Cargo.toml
# crossterm
tui-input = "*"
# termion
tui-input = { version = "*", features = ["termion"], default-features = false }
Features
- crossterm (default)
- termion
- serde
Demo
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)
Dependencies
~2–11MB
~121K SLoC