Crate rat_input

source ·
Expand description

crates.io Documentation License License

§Data input widgets for 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 :)

§TextArea

Editable text area.

  • Range based text styles.
  • Text selection with keyboard + mouse
  • Possible states as style: Focused
  • Emoji supported.

image

§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.

Basic menu widget. Although no submenus as popup.

§StatusLine

Statusline with multiple segments.

Modules§

Enums§

  • Locales matching the locales in glibc.