#input #tui #terminal

tui-input

TUI input library supporting multiple backends

17 unstable releases

0.9.0 Jun 29, 2024
0.8.0 Aug 7, 2023
0.7.1 May 23, 2023
0.7.0 Mar 22, 2023
0.1.2 Nov 4, 2021

#41 in Command-line interface

Download history 4752/week @ 2024-03-31 3954/week @ 2024-04-07 6666/week @ 2024-04-14 8622/week @ 2024-04-21 9591/week @ 2024-04-28 10729/week @ 2024-05-05 11511/week @ 2024-05-12 12393/week @ 2024-05-19 8165/week @ 2024-05-26 5078/week @ 2024-06-02 6596/week @ 2024-06-09 4999/week @ 2024-06-16 3599/week @ 2024-06-23 3124/week @ 2024-06-30 3709/week @ 2024-07-07 3443/week @ 2024-07-14

14,222 downloads per month
Used in 58 crates (56 directly)

MIT license

28KB
661 lines

tui-input

Crate Status Docs Status

tui-input.gif

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

~1.1–6.5MB
~25K SLoC