A collection of cli loaders for your command-line applications.
Visit the website to see all loaders!
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_variant_1');
You can also customize the speed of the loader:
import { initLoader } from 'cli-loaders';
// Initialize with custom speed
initLoader('dots_variant_1', 100);
New to v2.0+, you can import a custom loader initializer, initCustomLoader
import { initCustomLoader } from 'cli-loaders';
Then use it with your own speed and keyframe arguments:
initCustomLoader(100, ["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]);
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.