Spinner component for Ink. Uses cli-spinners for the collection of spinners.
$ npm install ink-spinner
const {h, render} = require('ink');
const Spinner = require('ink-spinner');
render((
<div>
<Spinner green/> Loading
</div>
));
All props except the own ones listed below are passed as-is to <Text>
, which means you can easily apply any color, without wrapping <Spinner>
in <Text>
manually.
Type: string
Defaults: dots
Type of a spinner. See cli-spinners for available spinners.
MIT © Vadim Demedes