Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | # cli-spinners
|
---|
| 2 |
|
---|
| 3 | > 70+ spinners for use in the terminal
|
---|
| 4 |
|
---|
| 5 | <p align="center">
|
---|
| 6 | <br>
|
---|
| 7 | <img width="700" src="screenshot.svg">
|
---|
| 8 | <br>
|
---|
| 9 | <br>
|
---|
| 10 | </p>
|
---|
| 11 |
|
---|
| 12 | The list of spinners is just a [JSON file](spinners.json) and can be used wherever.
|
---|
| 13 |
|
---|
| 14 | You probably want to use one of these spinners through the [`ora`](https://github.com/sindresorhus/ora) module.
|
---|
| 15 |
|
---|
| 16 | ## Install
|
---|
| 17 |
|
---|
| 18 | ```
|
---|
| 19 | $ npm install cli-spinners
|
---|
| 20 | ```
|
---|
| 21 |
|
---|
| 22 | ## Usage
|
---|
| 23 |
|
---|
| 24 | ```js
|
---|
| 25 | const cliSpinners = require('cli-spinners');
|
---|
| 26 |
|
---|
| 27 | console.log(cliSpinners.dots);
|
---|
| 28 | /*
|
---|
| 29 | {
|
---|
| 30 | interval: 80,
|
---|
| 31 | frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
---|
| 32 | }
|
---|
| 33 | */
|
---|
| 34 | ```
|
---|
| 35 |
|
---|
| 36 | ## Preview
|
---|
| 37 |
|
---|
| 38 | The header GIF is outdated. See all the [spinner at once](https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/) or [one at the time](https://asciinema.org/a/95348?size=big).
|
---|
| 39 |
|
---|
| 40 | ## API
|
---|
| 41 |
|
---|
| 42 | Each spinner comes with a recommended `interval` and an array of `frames`.
|
---|
| 43 |
|
---|
| 44 | [See the spinners.](spinners.json)
|
---|
| 45 |
|
---|
| 46 | The `random` spinner will return a random spinner each time it's called.
|
---|
| 47 |
|
---|
| 48 | ## Related
|
---|
| 49 |
|
---|
| 50 | - [ora](https://github.com/sindresorhus/ora) - Elegant terminal spinner
|
---|
| 51 | - [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinners for Swift
|
---|
| 52 | - [py-spinners](https://github.com/ManrajGrover/py-spinners) - Python port
|
---|
| 53 | - [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
|
---|
Note:
See
TracBrowser
for help on using the repository browser.