Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpil/spinner
https://github.com/lpil/spinner
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/lpil/spinner
- Owner: lpil
- Created: 2024-01-07T23:28:06.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-04T13:02:11.000Z (7 months ago)
- Last Synced: 2024-10-08T11:11:18.121Z (about 1 month ago)
- Language: Gleam
- Size: 88.9 KB
- Stars: 21
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-gleam - spinner - [📚](https://hexdocs.pm/spinner/) - Animated progress spinners for your console (Packages / Command Line)
README
# spinner
[![Package Version](https://img.shields.io/hexpm/v/spinner)](https://hex.pm/packages/spinner)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/spinner/)![The spinner running in a terminal](spinner.gif)
Animated progress spinners for your console.
Works on both Erlang and JavaScript runtimes.
```sh
gleam add spinner
```
```gleam
import spinner
import gleam/io
import gleam_community/ansipub 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)
io.println("Done!")
}
```Further documentation can be found at .