10 releases (5 breaking)

new 0.14.0 May 20, 2024
0.13.3 May 18, 2024
0.12.0 May 12, 2024
0.11.0 May 10, 2024
0.9.0 May 3, 2024

#249 in Command-line interface

Download history 84/week @ 2024-04-27 294/week @ 2024-05-04 417/week @ 2024-05-11

795 downloads per month
Used in 3 crates

MIT/Apache

215KB
5K SLoC

crates.io Documentation License License

Widgets for text-input based on ratatui.

These widgets are plain vanilla ratatui widgets.

Eventhandling is currently crossterm only. In practice event-handling is calling 1 or 2 functions on the state, so this should be easy to map to other systems. (Contributions welcome :)

TextInput

Basic text input field.

  • Text selection with keyboard + mouse
  • Possible states as styles: Focused, Invalid

#MaskedInput

Text input with an input mask.

  • Text selection with keyboard + mouse
  • Possible states as styles: Focused, Invalid
  • Pattern based input -> "##,###,##0.00"
    • number patterns: 09#-+.,
    • numeric text: HhOoDd
    • text: lac_
    • arbitrary separators between sub-fields
  • info-overlay for sub-fields without value
  • Localization with rat-input::NumberSymbols based on pure-rust-locales

#Button

Simple button widget.

#DateInput

Date input with format strings parsed by chrono.

#Month

Widget for calender display.

#MenuLine

Basic menu widget. Although no submenus as popup.

#StatusLine

Statusline with multiple segments.

Dependencies

~10–17MB
~176K SLoC