Socket
Socket
Sign inDemoInstall

cli-spinners

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-spinners

Spinners for use in the terminal


Version published
Maintainers
1
Weekly downloads
22,159,778
decreased by-6.5%

Weekly downloads

Package description

What is cli-spinners?

The cli-spinners package provides a collection of spinners for command-line interface (CLI) applications. These spinners can be used to indicate loading or processing status in a visually appealing way to the users of CLI applications.

What are cli-spinners's main functionalities?

Displaying Spinners

This feature allows you to display various spinner animations in the terminal. The code sample shows how to require the cli-spinners package and log one of the spinner types, in this case, 'dots'.

const cliSpinners = require('cli-spinners');
console.log(cliSpinners.dots);

Integrating with CLI Applications

This feature demonstrates how to integrate cli-spinners with another package like 'ora' to manage the spinner's lifecycle, including starting, stopping, and displaying success or failure messages.

const ora = require('ora');
const spinner = ora({
  text: 'Loading unicorns',
  spinner: cliSpinners.dots
}).start();

setTimeout(() => {
  spinner.succeed('Unicorns loaded');
}, 1000);

Other packages similar to cli-spinners

Readme

Source

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 module.

Install

npm install cli-spinners

Usage

const cliSpinners = require('cli-spinners');

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

Preview

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

API

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

See the spinners.

The random spinner will return a random spinner each time it's called.

Keywords

FAQs

Last updated on 24 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc