cli-spinners
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Cli-spinners is a handy tool that provides over 70 spinners for use in the terminal. It is essentially a visual effect that enhances the user experience while waiting for a process to complete in the command line interface. This package includes a variety of spinner styles, making it easy for developers to choose a spinner that best suits their application's aesthetics or personal preference. Each spinner in the cli-spinners comes with a recommended interval and an array of frames.
To use cli-spinners, first, you need to have Node.js installed in your system. Once you have Node.js, install cli-spinners using npm by running the command npm install cli-spinners
in the terminal. You can then require the 'cli-spinners' module in your JavaScript file. Utilize the spinner of your choice by calling it with the cliSpinners
object. Here is a brief example illustrating this:
const cliSpinners = require('cli-spinners');
console.log(cliSpinners.dots);
/* This will output:
{
interval: 80,
frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
}
*/
In this example, 'dots' is one of the spinners contained in the cliSpinners object. You can replace 'dots' with the name of any spinner included in the package to use it.
The main source of documentation for cli-spinners is the README file provided on the project's GitHub page at https://github.com/sindresorhus/cli-spinners. Here you'll find the essential information required to utilize the package, including installation instructions, usage examples, and a link to the list of all available spinners. For a detailed look at individual spinners, you can refer to the 'spinners.json' file linked in the README. This file provides the interval
and frames
values for each spinner, offering valuable insight into their constructions.