Documentation
¶
Overview ¶
Package cursor provides a virtual cursor to support the textinput and textarea elements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlinkMsg ¶
type BlinkMsg struct {
// contains filtered or unexported fields
}
BlinkMsg signals that the cursor should blink. It contains metadata that allows us to tell if the blink message is the one we're expecting.
type Model ¶
type Model struct {
// Style styles the cursor block.
Style lipgloss.Style
// TextStyle is the style used for the cursor when it is blinking
// (hidden), i.e. displaying normal text.
TextStyle lipgloss.Style
// BlinkSpeed is the speed at which the cursor blinks. This has no effect
// unless [CursorMode] is not set to [CursorBlink].
BlinkSpeed time.Duration
// Blink is the state of the cursor blink. When true, the cursor is hidden.
Blink bool
// contains filtered or unexported fields
}
Model is the Bubble Tea model for this cursor element.
func (Model) Mode ¶
Mode returns the model's cursor mode. For available cursor modes, see type Mode.
func (*Model) SetMode ¶
SetMode sets the model's cursor mode. This method returns a command.
For available cursor modes, see type CursorMode.
Click to show internal directories.
Click to hide internal directories.