You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initCliLoader(dots_14, 100, ["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]); // Render loader with speed and keyframes customized
70
87
```
71
88
72
-
### Upgrading versions
89
+
Or you could customize it with an object:
90
+
91
+
```typescript
92
+
const myAwesomeLoader = {
93
+
speed: 100,
94
+
keyframes: ["..", "."]
95
+
};
96
+
97
+
initCliLoader(myAwesomeLoader);
98
+
```
99
+
100
+
### Stopping the Loader
101
+
102
+
To stop the loader, you can use `clearInterval` with the interval ID returned by `initCliLoader`:
103
+
104
+
```typescript
105
+
import { initCliLoader } from'cli-loaders';
106
+
107
+
const intervalId =initCliLoader('dots_1');
108
+
109
+
// Stop the loader after some time
110
+
setTimeout(() => {
111
+
clearInterval(intervalId);
112
+
}, 5000);
113
+
```
73
114
74
-
Upgrading versions can be breaking. Double check the [website](https://cliloaders.com) 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.
115
+
## Available Loaders
116
+
117
+
Here are some of the available loaders you can use:
118
+
119
+
-`arrows_1`
120
+
-`arrows_2`
121
+
-`bars_1`
122
+
-`bars_2`
123
+
-`circles_1`
124
+
-`circles_2`
125
+
-`dots_1`
126
+
-`dots_2`
127
+
-`emojis_1`
128
+
-`emojis_2`
129
+
-`lines_1`
130
+
-`lines_2`
131
+
-`numbers_1`
132
+
-`numbers_2`
133
+
-`squares_1`
134
+
-`squares_2`
135
+
-`symbols_1`
136
+
-`symbols_2`
137
+
-`togglers_1`
138
+
-`togglers_2`
139
+
140
+
For a full list of available loaders, please refer to the [source code](/src/cli-loaders.ts) or the [website](https://cliloaders.com).
141
+
142
+
## Performance
143
+
144
+
cli-loaders is, as it should be, very fast. It's tree shakable, and uses 0(1) time complexity to access the loader objects.
0 commit comments