Skip to main content

Module textarea

Module textarea 

Source
Expand description

Cleanroom Rust port of upstream Go source file: textarea/textarea.go Upstream Target Tag / Version: v2.1.0

# TextArea

A multi-line text input component for Bubble Tea applications.

The placeholder word/hard wrapping is a char-based port of the charmbracelet/x/ansi Wordwrap/Hardwrap algorithms.

Structs§

CursorStyle
CursorStyle is the style for real and virtual cursors.
KeyMap
KeyMap is the key bindings for different actions within the textarea.
LineInfo
LineInfo is a helper for keeping track of line information regarding soft-wrapped lines.
Model
Model is the Bubble Tea model for this text area element.
PasteErrMsg
PasteMsgInternal
Internal messages for clipboard operations.
PromptInfo
PromptInfo is a struct that can be used to store information about the prompt.
StyleState
StyleState that will be applied to the text area.
Styles
Styles are the styles for the textarea, separated into focused and blurred states. The appropriate styles will be chosen based on the focus state of the textarea.

Functions§

blink
Blink returns the blink command for the virtual cursor.
default_dark_styles
DefaultDarkStyles returns the default styles for a dark background.
default_key_map
DefaultKeyMap returns the default set of key bindings for navigating and acting upon the textarea.
default_light_styles
DefaultLightStyles returns the default styles for a light background.
default_styles
DefaultStyles returns the default styles for focused and blurred states for the textarea.
new
New creates a new model with default settings.