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 7263/week @ 2025-01-31 7412/week @ 2025-02-07 6981/week @ 2025-02-14 7666/week @ 2025-02-21 6671/week @ 2025-02-28 6483/week @ 2025-03-07 7108/week @ 2025-03-14 6736/week @ 2025-03-21 6452/week @ 2025-03-28 6426/week @ 2025-04-04 7204/week @ 2025-04-11 7456/week @ 2025-04-18 9262/week @ 2025-04-25 32371/week @ 2025-05-02 24089/week @ 2025-05-09 23395/week @ 2025-05-16

90,704 downloads per month
Used in 117 crates (105 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
~127K SLoC