https://github.com/favware/colorette-spinner
A super tiny and efficient terminal spinner based on nanospinner
https://github.com/favware/colorette-spinner
Last synced: 11 months ago
JSON representation
A super tiny and efficient terminal spinner based on nanospinner
- Host: GitHub
- URL: https://github.com/favware/colorette-spinner
- Owner: favware
- License: mit
- Created: 2022-06-07T19:14:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-13T00:44:00.000Z (11 months ago)
- Last Synced: 2025-07-13T05:30:42.472Z (11 months ago)
- Language: TypeScript
- Size: 15.6 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# colorette-spinner
**A super tiny and efficient terminal spinner based on [nanospinner]**
[](https://github.com/favware/colorette-spinner/blob/main/LICENSE)
[](https://www.npmjs.com/package/@favware/colorette-spinner)
[](https://join.favware.tech)

## Description
This is an extremely tiny and simple terminal spinner based on [nanospinner]
while using [colorette] instead of picocolors
## Installation
You can use the following command to install this package, or replace
`npm install -D` with your package manager of choice.
```sh
npm install -D @favware/colorette-spinner
```
## Usage
.spin()
Looping over `spin` method will animate a given spinner.
```js
setInterval(() => {
spinner.spin();
}, 25);
```
.start(options?)
In order to start the spinner call `start`. This will perform drawing the
spinning animation
```js
spinner.start();
spinner.start({ text: 'Start', color: 'yellow' });
```
.stop(options?)
In order to stop the spinner call `stop`. This will finish drawing the spinning
animation and return to new line.
```js
spinner.stop();
spinner.stop({ text: 'Done!', mark: ':O', color: 'magenta' });
```
.success(options?)
Use `success` call to stop the spinning animation and replace the spinning
symbol with check mark character to indicate successful completion.
```js
spinner.success();
spinner.success({ text: 'Successful!', mark: ':)' });
```
.warn(options?)
Use `warn` call to stop the spinning animation and replace the spinning symbol
with warn mark character to indicate warning completion.
```js
spinner.warn();
spinner.warn({ text: 'Warning!', mark: ':|' });
```
.error(options?)
Use `error` call to stop the spinning animation and replace the spinning symbol
with cross character to indicate error completion.
```js
spinner.error();
spinner.error({ text: 'Error!', mark: ':(' });
```
.update(options?)
Use `update` call to dynamically change
```js
spinner.update({
text: 'Run test',
color: 'white',
stream: process.stdout,
frames: ['.', 'o', '0', '@', '*'],
interval: 100
});
```
.clear()
Clears the spinner`s output
```js
spinner.clear();
```
.reset()
In order to reset the spinner to its initial frame do:
```js
spinner.reset();
```
## Buy us some doughnuts
Favware projects are and always will be open source, even if we don't get
donations. That being said, we know there are amazing people who may still want
to donate just to show their appreciation. Thank you very much in advance!
We accept donations through Ko-fi, Paypal, Patreon, GitHub Sponsorships, and
various cryptocurrencies. You can use the buttons below to donate through your
method of choice.
| Donate With | Address |
| :-------------: | :-----------------------------------------------: |
| Ko-fi | [Click Here](https://donate.favware.tech/kofi) |
| Patreon | [Click Here](https://donate.favware.tech/patreon) |
| PayPal | [Click Here](https://donate.favware.tech/paypal) |
| GitHub Sponsors | [Click Here](https://github.com/sponsors/Favna) |
| Bitcoin | `1E643TNif2MTh75rugepmXuq35Tck4TnE5` |
| Ethereum | `0xF653F666903cd8739030D2721bF01095896F5D6E` |
| LiteCoin | `LZHvBkaJqKJRa8N7Dyu41Jd1PDBAofCik6` |
## Contributors
Please make sure to read the [Contributing Guide][contributing] before making a
pull request.
Thank you to all the people who already contributed to Sapphire!
[contributing]: ./.github/CONTRIBUTING.md
[nanospinner]: https://github.com/usmanyunusov/nanospinner