Crate rat_input

source ·
Expand description

crates.io Documentation License License

§Widgets for text-input based on ratatui.

Eventhandling is currently crossterm only.

In practice event-handling is calling 1 or 2 functions on the state, so this
should be simple to map for other systems. 

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

#Button

Modules§

Structs§

  • Default key bindings when focused. Also handles all events that are MouseOnly.
  • Handler for mouse events only.

Enums§

  • Locales matching the locales in glibc.
  • Result value for event-handling. Used widgets in this crate.

Traits§

  • A very broad trait for an event handler for widgets.