beamtea_textarea (beamtea v0.1.2)
View SourceA bubble: a multi-line text area, mirroring the textarea package in charmbracelet/bubbles.
Full multi-line editing: insertion, newlines, backspace/delete across line boundaries, and caret movement with the arrows and Home/End. The visible window scrolls vertically to keep the caret in view. As with beamtea_textinput, the caret is drawn with reverse video.
Summary
Functions
Options: height (visible rows, default 6), placeholder, color, and value (initial contents).
Edit in response to a key (only while focused).
The full contents as a UTF-8 binary (lines joined with \n).
Render the visible lines with the caret (or a faint placeholder).
Types
Functions
-spec cursor(model()) -> {non_neg_integer(), non_neg_integer()}.
-spec line_count(model()) -> pos_integer().
-spec new() -> model().
Equivalent to new(#{}).
Options: height (visible rows, default 6), placeholder, color, and value (initial contents).
-spec update(term(), model()) -> {model(), beamtea:cmd()}.
Edit in response to a key (only while focused).
The full contents as a UTF-8 binary (lines joined with \n).
Render the visible lines with the caret (or a faint placeholder).