Expand description
Input component - Text input field with cursor
Supports single-line text input with cursor movement, label display, focus styling, and click-to-focus.
§Example
use ratatui_interact::components::{Input, InputState, InputStyle};
let mut state = InputState::new("Hello");
// Cursor is at end by default
assert_eq!(state.cursor_pos, 5);
// Insert character
state.insert_char('!');
assert_eq!(state.text, "Hello!");
// Move cursor
state.move_left();
state.insert_char(' ');
assert_eq!(state.text, "Hello !");Structs§
- Input
- Input widget.
- Input
State - State for an input field.
- Input
Style - Configuration for input appearance.
Enums§
- Input
Action - Actions an input can emit.