bokub/chalk-animation
bokub/chalk-animation has 2,185 GitHub stars and 75 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-07 03:53 UTC. Last push 2022-11-13.
:clapper: Colorful animations in terminal output
Measured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalchalk-animation
Colorful animations in terminal output
Available animations
| Name | Preview |
|---|---|
| rainbow | ![]() |
| pulse | ![]() |
| glitch | ![]() |
| radar | ![]() |
| neon | ![]() |
| karaoke | ![]() |
Install
$ npm i chalk-animation
Usage
import chalkAnimation from 'chalk-animation';
chalkAnimation.rainbow('Lorem ipsum dolor sit amet');
Start and stop
You can stop and resume an animation with stop() and start().
When created, the instance of chalkAnimation starts automatically.
const rainbow = chalkAnimation.rainbow('Lorem ipsum'); // Animation starts
setTimeout(() => {
rainbow.stop(); // Animation stops
}, 1000);
setTimeout(() => {
rainbow.start(); // Animation resumes
}, 2000);
Automatic stop
Anything printed to the console will stop the previous animation automatically
chalkAnimation.rainbow('Lorem ipsum');
setTimeout(() => {
// Stop the 'Lorem ipsum' animation, then write on a new line.
console.log('dolor sit amet');
}, 1000);
Changing speed
Change the animation speed using a second parameter. Should be greater than 0, default is 1.
chalkAnimation.rainbow('Lorem ipsum', 2); // Two times faster than default
Changing text
Change the animated text seamlessly with replace()
let str = 'Loading...';
const rainbow = chalkAnimation.rainbow(str);
// Add a new dot every second
setInterval(() => {
rainbow.replace(str += '.');
}, 1000);
Manual rendering
Manually render frames with render(), or get the content of the next frame with frame()
const rainbow = chalkAnimation.rainbow('Lorem ipsum').stop(); // Don't start the animation
rainbow.render(); // Display the first frame
const frame = rainbow.frame(); // Get the second frame
console.log(frame);
CLI mode
# Install package globally
$ npm install --global chalk-animation
$ chalk-animation --help
Colorful animations in terminal output
Usage
$ chalk-animation <name> [options] [text...]
Options
--duration Duration of the animation in ms, defaults to Infinity
--speed Animation speed as number > 0, defaults to 1
Available animations
rainbow
pulse
glitch
radar
neon
karaoke
Example
$ chalk-animation rainbow Hello world!
Related
- gradient-string - Output gradients to terminal
- chalk - Output colored text to terminal
License
MIT © Boris K
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,474 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,243 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,656 starsmrdoob/three.js
JavaScript 3D Library.
117,669 stars




