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: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lpil/spinner
- Owner: lpil
- Created: 2024-01-07T23:28:06.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T14:02:11.000Z (about 1 month ago)
- Last Synced: 2024-11-06T15:18:04.380Z (about 1 month ago)
- Language: Gleam
- Size: 90.8 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- 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 .