cli-spinners

Spinners for use in the terminal

cli-spinners downloads cli-spinners version cli-spinners license

cli-spinners类似的npm包:
npm下载趋势
3 年
🌟 在 cli-spinners 的 README.md 中显示实时使用量图表,只需复制下面的代码。
## Usage Trend
[![Usage Trend of cli-spinners](https://npm-compare.com/img/npm-trend/THREE_YEARS/cli-spinners.png)](https://npm-compare.com/cli-spinners#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 在 cli-spinners 的 README.md 中显示 GitHub stars 趋势图表,只需复制下面的代码。
## GitHub Stars Trend
[![GitHub Stars Trend of cli-spinners](https://npm-compare.com/img/github-trend/cli-spinners.png)](https://npm-compare.com/cli-spinners)
统计详情
npm包名称
下载量
Stars
大小
Issues
发布时间
License
cli-spinners20,879,8292,66333.2 kB43 个月前MIT
cli-spinners的README

cli-spinners

70+ spinners for use in the terminal




The list of spinners is just a JSON file and can be used wherever.

You probably want to use one of these spinners through the ora package.

Install

npm install cli-spinners

Usage

import cliSpinners from 'cli-spinners';

console.log(cliSpinners.dots);
/*
{
	interval: 80,
	frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
}
*/
  • interval is the intended time per frame, in milliseconds.
  • frames is an array of frames to show for the spinner.

Preview

The header GIF is outdated. See all the spinner at once or one at the time.

API

cliSpinners

Each spinner comes with a recommended interval and an array of frames.

See the spinners.

randomSpinner()

Get a random spinner.

import {randomSpinner} from 'cli-spinners';

console.log(randomSpinner());
/*
{
	interval: 80,
	frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
}
*/

Related