thinking

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package thinking provides an animated thinking indicator with scrambled gradient text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is an animated thinking indicator with gradient scrambled characters.

func New

func New(theme styles.Theme, settings Settings) *Model

New creates a new thinking indicator.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init starts the animation.

func (*Model) SetLabel

func (m *Model) SetLabel(label string)

SetLabel updates the label and resets birth offsets.

func (*Model) SetSize

func (m *Model) SetSize(size int)

SetSize updates the scramble size.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) tea.Cmd

Update handles tick messages.

func (*Model) View

func (m *Model) View() string

View renders the thinking indicator.

type Settings

type Settings struct {
	Size  int    // Number of scramble characters (default 12)
	Label string // Optional label that appears after scramble
}

Settings configures the thinking indicator.

type TickMsg

type TickMsg struct {
	// contains filtered or unexported fields
}

TickMsg triggers the next animation frame.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL