pub fn new() -> ModelExpand description
Creates a new text input model with default settings.
The returned model is not focused by default. Call focus() to enable keyboard input.
§Returns
A new Model instance with default configuration:
- Empty value and placeholder
- Default prompt (“> “)
- Normal echo mode
- No character or width limits
- Default key bindings
§Examples
use bubbletea_widgets::textinput::new;
let mut input = new();
input.focus();
input.set_placeholder("Enter text...");
input.set_width(30);§Note
This function matches Go’s New function exactly for compatibility.