spinner

Package Version Hex Docs

The spinner running in a terminal

Animated progress spinners for your console.

Works on both Erlang and JavaScript runtimes.

gleam add spinner
import spinner
import gleam_community/ansi

pub fn main() {
 let spinner =
   spinner.new("Reticulating 3-Dimensional Splines")
   |> spinner.with_colour(ansi.yellow)
   |> spinner.start

 // Do some stuff while the spinner runs...

 // The spinner text can be changed
 spinner.set_text(spinner, "Collecting Meteor Particles")

 // Finish it when you're done
 spinner.stop(spinner)
}

Further documentation can be found at https://hexdocs.pm/spinner.

Search Document