anim

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package anim provides an animated spinner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anim

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

Anim is a Bubble for an animated spinner.

func New

func New(opts Settings) *Anim

New creates a new Anim instance.

func (*Anim) Init

func (a *Anim) Init() tea.Cmd

func (*Anim) SetLabel

func (a *Anim) SetLabel(label string)

SetLabel updates the label for the animation.

func (*Anim) Step

func (a *Anim) Step() tea.Cmd

func (*Anim) Update

func (a *Anim) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Anim) View

func (a *Anim) View() string

type Settings

type Settings struct {
	Size        int
	Label       string
	LabelColor  color.Color
	GradColorA  color.Color
	GradColorB  color.Color
	CycleColors bool
}

Settings defines settings for the animation.

type StepMsg

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

StepMsg is a message type used to trigger the next step in the animation.

Jump to

Keyboard shortcuts

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