Spinner
March 28, 2026 · View on GitHub
Animated loading indicator cycling through a character sequence.
Constructor: NewSpinner(id, class, sequence string) *Spinner
Methods
Current() string— returns currently displayed characterRunning() bool— true if animation is activeSetSequence(sequence string)— updates animation sequence (space-separated characters)Start(interval time.Duration)— starts animationStop()— stops animationTick()— advances to next frame
Notes
Predefined sequences (use Spinners["key"]):
| Key | Characters |
|---|---|
"bar" | | / - \ |
"bounce" | ⠁ ⠂ ⠄ ⠂ |
"braille" | ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏ |
"circle" | ◐ ◓ ◑ ◒ |
"dot" | ⠁ ⠂ ⠄ ⡀ ⢀ ⠠ ⠐ ⠈ |
"dots" | . o O o |
"arrow" | ← ↖ ↑ ↗ → ↘ ↓ ↙ |