LogF-Spinner ·
Simple terminal spinner. Usable standalone or with other log-frame components.
Install
npm install logf-spinner
Usage
const LogFrame = ;const Spinner = ; // create, configure, and start spinnerconst spinner = 'dots';spinnertext = 'loading';spinnercolor = 'cyan';spinnerstart; // attach to frame for displayconst frame = ;frameview = spinner;
API
new Spinner('theme')
theme
The name of a spinner theme from cli-spinners. Some examples:
Or a custom theme object:
frames: '-' '|' interval: 40 // optional, default is 20;
Methods
.start()
Start spinning.
.stop()
Stop spinning.
Properties
.text
(string)
Optional text to display next to the spinner.
.color
(string)
Optional color tint to apply to the spinner.