tui textbox for viewers
Add an editable text field. Tab to focus it, then type.
Command Type
built-in
Signature
> tui textbox {flags}
Flags
--placeholder {string}: Shown when empty.--value {string}: Initial text.--id {string}: Widget id.--focus: Start with this widget focused.
Input/output types:
| input | output |
|---|---|
| nothing | tui |
| tui | tui |
| any | tui |
Examples
Type into a text box and submit (headless)
> tui textbox --placeholder "name" | tui debug --keys "type:Ada,enter" | get selectedNotes
While focused, q is a character, Esc leaves the field, Enter submits the TUI with the text as selected. The text is also returned under values keyed by widget id.