Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ink-spinner

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-spinner

Spinner component for Ink

  • 4.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is ink-spinner?

The ink-spinner npm package provides a collection of customizable spinner components for use with Ink, a React-like library for building command-line interfaces. It allows developers to add loading spinners to their CLI applications, enhancing the user experience by indicating ongoing processes.

What are ink-spinner's main functionalities?

Basic Spinner

This feature demonstrates how to use a basic spinner in an Ink application. The spinner type is set to 'dots', and it is displayed alongside a 'Loading...' message.

const { render } = require('ink');
const Spinner = require('ink-spinner').default;
const React = require('react');

const App = () => (
  <div>
    <Spinner type="dots" /> Loading...
  </div>
);

render(<App />);

Custom Spinner Type

This feature shows how to use a custom spinner type. In this example, the spinner type is set to 'line', and it is displayed with a 'Processing...' message.

const { render } = require('ink');
const Spinner = require('ink-spinner').default;
const React = require('react');

const App = () => (
  <div>
    <Spinner type="line" /> Processing...
  </div>
);

render(<App />);

Spinner with Custom Color

This feature demonstrates how to customize the color of the spinner. The spinner type is 'dots', and it is wrapped in a Color component to display it in green.

const { render } = require('ink');
const Spinner = require('ink-spinner').default;
const React = require('react');
const { Color } = require('ink');

const App = () => (
  <div>
    <Color green>
      <Spinner type="dots" /> Loading...
    </Color>
  </div>
);

render(<App />);

Other packages similar to ink-spinner

Keywords

FAQs

Package last updated on 07 May 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc