SpinnerStyleOptions
The SpinnerStyle type defines the available built-in animation styles for a spinner component in ts-better-console. Each style provides a different visual animation pattern for the loading indicator.
Type Definition
The SpinnerStyle type accepts the following string values:
"dots": A dots-based animation (e.g., ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏)."line": A line-based animation (e.g., - \ | /)."bounce": A bouncing animation style."arrow": An arrow-based animation (e.g., ← ↖ ↑ ↗ → ↘ ↓ ↙)."moon": A moon phase animation (e.g., 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘).
type SpinnerStyle = "dots" | "line" | "bounce" | "arrow" | "moon";
Usage
You can use SpinnerStyle within SpinnerOptions to select a built-in animation:
import { Spinner } from "ts-better-console";
// Dots style
new Spinner({ style: "dots" });
// Line style
new Spinner({ style: "line" });
// Bounce style
new Spinner({ style: "bounce" });
// Arrow style
new Spinner({ style: "arrow" });
// Moon style
new Spinner({ style: "moon" });
Want to support this project?
If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.
Want to contribute to this project?
Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!