1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
# tui-input
[](https://crates.io/crates/tui-input)
[](https://docs.rs/tui-input/)
[](https://github.com/sayanarijit/tui-input/blob/main/examples/ratatui-input/src/main.rs)
A TUI input library supporting multiple backends.
This crate can be used with [tui-rs](https://github.com/fdehau/tui-rs) and [ratatui](https://github.com/tui-rs-revival/ratatui).
For people using `tui-rs` use version `v0.6.*` for people migrating to `ratatui` use latest version.
## Install
Cargo.toml
```toml
# crossterm
tui-input = "*"
# termion
tui-input = { version = "*", features = ["termion"], default-features = false }
```
## Features
- crossterm (default)
- termion
- serde
## Demo
See [examples](https://github.com/sayanarijit/tui-input/tree/main/examples).
```bash
# 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)
```
|