espinner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpinnerStyleDefault = SpinnerStyle{
	ProgressStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("15")).Faint(true),
	SuccessStyle:  lipgloss.NewStyle().Foreground(lipgloss.Color("2")),
	FailureStyle:  lipgloss.NewStyle().Foreground(lipgloss.Color("1")).Bold(true),
}

Functions

This section is empty.

Types

type Spinner

type Spinner = spinner.Spinner

type SpinnerModel

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

Bubbletea model of the spinner, wraps spinner.Model and contains the task to execute

func NewSpinner

func NewSpinner(title string, task SpinnerTask) SpinnerModel

Create a new SpinnerModel.

func (SpinnerModel) Err

func (m SpinnerModel) Err() error

func (SpinnerModel) Init

func (m SpinnerModel) Init() tea.Cmd

Initialize the SpinnerModel

func (*SpinnerModel) Spin

func (s *SpinnerModel) Spin() error

Run the SpinnerModel.

func (SpinnerModel) Update

func (m SpinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SpinnerModel) View

func (m SpinnerModel) View() string

func (SpinnerModel) WithSpinner

func (m SpinnerModel) WithSpinner(s Spinner) SpinnerModel

Specify the spinner of the SpinnerModel.

s := espinner.NewSpinner(...).WithSpinner(spinner.Dot)

func (SpinnerModel) WithSpinnerStyle

func (m SpinnerModel) WithSpinnerStyle(s lipgloss.Style) SpinnerModel

Specify the spinner style of the SpinnerModel.

s := espinner.NewSpinner(...).WithStyle(etable.SpinnerStyleDefault)

func (SpinnerModel) WithStyle

func (m SpinnerModel) WithStyle(s SpinnerStyle) SpinnerModel

Specify the style of the SpinnerModel.

s := espinner.NewSpinner(...).WithStyle(etable.SpinnerStyleDefault)

type SpinnerStyle

type SpinnerStyle struct {
	ProgressStyle lipgloss.Style
	SuccessStyle  lipgloss.Style
	FailureStyle  lipgloss.Style
}

Spinner style definition

type SpinnerTask

type SpinnerTask = func() error

Jump to

Keyboard shortcuts

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