@mudah-cli/animation
v0.9.4
Published
60fps terminal animation engine: ticker, spinners, progress bars, task trees, and transitions.
Maintainers
Readme
@mudah-cli/animation
60fps terminal animation engine: ticker, spinners, progress bars, task trees, and transitions.
Part of Mudah — an ergonomic, animation-rich CLI
framework. Depends only on @mudah-cli/terminal.
Install
npm install @mudah-cli/animationUsage
import { Spinner, ProgressBar } from '@mudah-cli/animation';
const spinner = new Spinner();
await spinner.with('Deploying…', async () => {
// run async work; the spinner stops even if it throws
});
const bar = new ProgressBar({ total: files.length, stream: process.stderr });
files.forEach((_, i) => bar.set(i + 1));
bar.complete();Spinners and animations degrade to static output when MUDAH_REDUCED_MOTION=1, the terminal is
non-TTY, or CI is set. TaskRunner and TaskTree compose multiple tasks with per-task lifecycle
hooks; easing presets and a delta-time AnimationClock are included.
