Lightweight and highly customizable spinner library for Go, designed to enhance your command-line applications with visually appealing progress indicators. With +70 spinners to choose from, you can easily integrate dynamic loading animations into your projects.
You can check out the spinners with the following commands:
- Simple demo
go run github.com/mateconpizza/rotato/example@latest -demo- All spinners
go run github.com/mateconpizza/rotato/example@latest -all- List by groups
go run github.com/mateconpizza/rotato/example@latest -list- Show by group
go run github.com/mateconpizza/rotato/example@latest -group <name>- Show by name
go run github.com/mateconpizza/rotato/example@latest -show <name>- Show more spinners
go run github.com/mateconpizza/rotato/example@latest -morego get github.com/mateconpizza/rotato@latestNote
To see more, go to demo
- Simple example:
r := rotato.New(
rotato.WithPrefix("Repo"),
rotato.WithSpinnerColor(rotato.FgBrightGreen),
rotato.WithDoneColorMesg(rotato.FgBrightGreen.With(rotato.StyleItalic)),
rotato.WithFailColorMesg(rotato.FgRed.With(rotato.StyleBlink)),
)
r.Start()
// do some stuff
repo := git.New("https://github.com/mateconpizza/rotato")
r.UpdateMesg("Syncing Repo...")
if err := repo.Sync(); err != nil {
r.Fail("Sync Failed!")
return err
}
r.Done("Sync Completed!")This package uses symbols/spinners from this libraries, and of course ideas!
Thanks to:
Visible elements
- Terminal: st-terminal
- Font: maple-font
