22 releases (11 breaking)

0.12.1 Apr 30, 2025
0.11.1 Nov 27, 2024
0.9.0 Jun 29, 2024
0.8.0 Aug 7, 2023
0.1.2 Nov 4, 2021

#28 in Command-line interface

Download history 7287/week @ 2025-01-22 7445/week @ 2025-01-29 7545/week @ 2025-02-05 6762/week @ 2025-02-12 7537/week @ 2025-02-19 7211/week @ 2025-02-26 5955/week @ 2025-03-05 6825/week @ 2025-03-12 7327/week @ 2025-03-19 6378/week @ 2025-03-26 6463/week @ 2025-04-02 7113/week @ 2025-04-09 6460/week @ 2025-04-16 9566/week @ 2025-04-23 18234/week @ 2025-04-30 29408/week @ 2025-05-07

64,709 downloads per month
Used in 116 crates (104 directly)

MIT license

30KB
686 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

# ratatui::crossterm
tui-input = "*"

# Direct crossterm
tui-input = { version = "*", features = ["crossterm"], default-features = false }

# termion
tui-input = { version = "*", features = ["termion"], default-features = false }

Features

  • ratatui-crossterm (default)
  • ratatui-termion
  • crossterm
  • termion
  • serde

Demo

See examples.

# Run the ratatui example
cargo run --example ratatui_crossterm_input

# Run the example with crossterm as backend.
cargo run --example crossterm_input --features crossterm --no-default-features

# Run the example with termion as backend.
cargo run --example termion_input --features termion --no-default-features

Dependencies

~1–11MB
~126K SLoC