Components/Text area

Text area

A multi-line text editor with vertical scrolling, line-kill (Ctrl+K), word movement and the full readline binding set. Great for commit messages, notes, or any longform input.

Install the package

Every component ships in the single dart_tui package.

$dart pub add dart_tui
text area · dart_tui
Text area demo

TextAreaModel

PropertyTypeDescription
valueStringCurrent multi-line content.
cursorRow / cursorColintCursor position.
widthintEditor width in columns. Defaults to 60.
maxHeightintVisible rows before scrolling. Defaults to 10.
charLimitintMax characters. 0 = unlimited.
placeholderStringShown when empty.

Keybindings

ctrl+a / ctrl+eStart / end of line
ctrl+kKill to end of line
alt+← / alt+→Word left / right
ctrl+wDelete previous word

Related