A collection of cli loaders for your command-line applications.
Visit the website to see all loaders, copy keyframes, and more!
To install the package, use npm or yarn:
npm install cli-loaders
# or
yarn add cli-loaders
# or
bun install cli-loaders
Import the loader initializer
import { initLoader } from 'cli-loaders';
You can initialize any loader by its name using initLoader
import { initLoader } from 'cli-loaders';
// Initialize by name
initLoader('dots_1');
You can also customize the speed of the loader:
import { initLoader } from 'cli-loaders';
// Initialize with custom speed
initLoader('dots_1', 100);
New to v2.0+, you can import the cli loader initializer, initCliLoader
for full customization
import { initCliLoader, dots_14 } from 'cli-loaders';
Then use it with your own speed and keyframe arguments:
import { initCliLoader, dots_14 } from 'cli-loaders';
initCliLoader(dots_14); // Render loader
initCliLoader(dots_14, 100); // Render loader with custom speed
initCliLoader(dots_14, 100, ["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]); // Render loader with speed and keyframes customized
Upgrading versions can be breaking. Double check the website first, to see if a loader has moved or is following a new naming convention. The website will always be updated with the most current version of cli-loaders.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.
Special thanks to cli-spinners and sindresorhus for the json file for some of the loaders in this project.