22 releases (11 breaking)

new 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 6482/week @ 2025-01-11 7305/week @ 2025-01-18 7290/week @ 2025-01-25 6938/week @ 2025-02-01 7244/week @ 2025-02-08 7348/week @ 2025-02-15 7472/week @ 2025-02-22 6630/week @ 2025-03-01 6287/week @ 2025-03-08 7436/week @ 2025-03-15 6661/week @ 2025-03-22 6459/week @ 2025-03-29 6549/week @ 2025-04-05 6614/week @ 2025-04-12 8610/week @ 2025-04-19 7508/week @ 2025-04-26

30,342 downloads per month
Used in 114 crates (102 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