ink-progress-spinner
v1.1.1
Published
Progress spinner component for Ink
Downloads
5
Readme
ink-progress-spinner
Progress spinner component for Ink
Demo
Install
$ npm install ink-progress-spinner
Usage
const {h, render, Text} = require('ink');
const {ProgressSpinner, spinners} = require('ink-progress-spinner');
const characters = spinners[20].split('');
render(
<div>
<ProgressSpinner characters={characters} blue />
<Text> Something loading...</Text>
</div>
);
Props
characters
Type: string[]
Default: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈']
This is a list of letters making up spinner, and this element is rendered in turn.
delay
Type: number
Default: 60
The time, in milliseconds, is used as render interval.
ProgressSpinner supports Text component props. Text component uses chalk, and you could use its API methods as ProgressSpinner props.
License
MIT License