Expand description
Cleanroom Rust port of upstream Go source file: textarea/textarea.go
Upstream Target Tag / Version: v2.1.0
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§
- Cursor
Style - CursorStyle is the style for real and virtual cursors.
- KeyMap
- KeyMap is the key bindings for different actions within the textarea.
- Line
Info - 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.
- Paste
ErrMsg - Paste
MsgInternal - Internal messages for clipboard operations.
- Prompt
Info - PromptInfo is a struct that can be used to store information about the prompt.
- Style
State - 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.