Skip to main content

Module textinput

Module textinput 

Source
Expand description

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

# TextInput

A text input component for Bubble Tea applications.

Structs§

CursorStyle
CursorStyle is the style for real and virtual cursors.
KeyMap
KeyMap is the key bindings for different actions within the textinput.
Model
Model is the Bubble Tea model for this text input element.
PasteErrMsg
PasteMsgInternal
Internal messages for clipboard operations.
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.

Enums§

EchoMode
EchoMode sets the input behavior of the text input field.

Functions§

blink
Blink is a command used to initialize cursor blinking.
default_dark_styles
DefaultDarkStyles returns the default styles for a dark background.
default_key_map
DefaultKeyMap is the default set of key bindings for navigating and acting upon the textinput.
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.

Type Aliases§

ValidateFunc
ValidateFunc is a function that returns an error if the input is invalid.