Home

Awesome

ink-spinner test

Spinner component for Ink. Uses cli-spinners for the collection of spinners.

Looking for a version compatible with Ink 2.x? Check out this release.

Install

$ npm install ink-spinner

Usage

import React from 'react';
import { render, Text } from 'ink';
import Spinner from 'ink-spinner';

render(
	<Text>
		<Text color="green">
			<Spinner type="dots" />
		</Text>
		{' Loading'}
	</Text>
);
<img src="media/demo.gif" width="482">

Props

type

Type: string<br> Defaults: dots

Type of a spinner. See cli-spinners for available spinners.