@edisoncks/cli-loading-indicator
v1.1.1
Published
Animated CLI loading indicator using Unicode braille patterns
Readme
cli-loading-indicator

Animated command line loading indicator using Unicode braille patterns (based on Heroku CLI).
Usage
- Use
start()andstop()to enable or disable the loading indicator. - Optionally specify
rotationascw(clockwise) orccw(counterclockwise) - Optionally provide a custom
formatfunction to add text or colors for the loading indicator.
// ESM
import LoadingIndicator from "@edisoncks/cli-loading-indicator";
// CommonJS
const LoadingIndicator = require("@edisoncks/cli-loading-indicator").default;
const loader = new LoadingIndicator({
size: "large",
rotation: "cw",
format: (pattern) => `charging plasma cannon ${pattern}`,
});
// Display loading indicator for 5 seconds, and then stop.
loader.start();
setTimeout(() => {
loader.stop();
}, 5000);Compatibility
This library uses ANSI escape sequences for cursor control and animation. Supported terminals include:
- Linux — gnome-terminal, konsole, xterm, Alacritty, Kitty, WezTerm
- macOS — terminal.app, iTerm2, Alacritty, Kitty
- Windows — Windows Terminal
Limited or no support:
- Legacy Windows Console — cmd.exe, PowerShell (before Windows 10 1903).
DEC private modes (
?25l/h) were not supported in older environments.
Credits
Heavily inspired by heroku cli loading indicator
