loading-state-zoo 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -77
- package/dist/index.cjs +45 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -15
- package/dist/index.d.ts +3 -15
- package/dist/index.js +45 -152
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +40 -147
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -54
- package/dist/react.d.ts +1 -54
- package/dist/react.js +40 -147
- package/dist/react.js.map +1 -1
- package/dist/theme.css +5 -179
- package/docs/AI.md +8 -11
- package/docs/components.json +1500 -385
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# loading-state-zoo
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**26 loading patterns, one tiny package.** Dots, spinners, orbs, shapes, bars, music and skeletons that tell the user "please wait" — made silky smooth and ready to use in **React**, **plain websites**, and **iOS / Android apps**.
|
|
4
|
+
|
|
5
|
+
> **Recommended production version.** v0.4.1 is the stable, production-tested line of `loading-state-zoo`. Install `npm i loading-state-zoo@^0.4.1` for the latest recommended release.
|
|
4
6
|
|
|
5
7
|
Think of it as a small zoo of loading animals. You pick an animal, put it in your app's cage, and it starts moving right away. You can even change its **color**, **size** and **speed** — no scissors or glue required.
|
|
6
8
|
|
|
@@ -29,10 +31,6 @@ Think of it as a small zoo of loading animals. You pick an animal, put it in you
|
|
|
29
31
|
| [Orbit dots](#orbit-dots) | Spinner | Floaty, lightweight loading |
|
|
30
32
|
| [Orbit ring dots](#orbit-ring-dots) | Spinner | Cosmetic ring, data-heavy load |
|
|
31
33
|
| [Sonar](#sonar) | Spinner | Radar pings, location detection |
|
|
32
|
-
| [iOS 27 orb](#ios-27-orb) | Orbs | Voice assistants, AI thinking, holographic waits |
|
|
33
|
-
| [AI orb](#ai-orb) | AI | AI assistants, generative waits |
|
|
34
|
-
| [AI thinking](#ai-thinking) | AI | Chat completions, waiting on answers |
|
|
35
|
-
| [AI neural](#ai-neural) | AI | Neural nets, model training |
|
|
36
34
|
| [Eyes](#eyes) | Shape | Fun state, "watching" waiting |
|
|
37
35
|
| [Morphing square](#morphing-square) | Shape | Modern brand moments |
|
|
38
36
|
| [Breathing pulse](#breathing-pulse) | Shape | Subtle, gentle "alive" loading |
|
|
@@ -83,7 +81,7 @@ export function MyLoader() {
|
|
|
83
81
|
}
|
|
84
82
|
```
|
|
85
83
|
|
|
86
|
-
That's it. Importing the package **automatically registers** all
|
|
84
|
+
That's it. Importing the package **automatically registers** all 26 elements for you (it's safe to import in many places — duplicates are skipped). It is also safe on the server (SSR/Next.js): on Node there is no browser, so nothing registers and nothing breaks.
|
|
87
85
|
|
|
88
86
|
If you prefer to register manually:
|
|
89
87
|
|
|
@@ -111,7 +109,7 @@ Add the package from a CDN (or bundle it) and write the tags directly in your HT
|
|
|
111
109
|
</div>
|
|
112
110
|
```
|
|
113
111
|
|
|
114
|
-
Mix and match any of the
|
|
112
|
+
Mix and match any of the 26 tags — see the full list below.
|
|
115
113
|
|
|
116
114
|
---
|
|
117
115
|
|
|
@@ -235,9 +233,6 @@ Every number inside every animation is also a CSS variable. Change how far dots
|
|
|
235
233
|
| `--lz-eq-min` | Equalizer | Shortest bar height | `0.3` |
|
|
236
234
|
| `--lz-slide-from` | Indeterminate bar | Slider start position | `-100%` |
|
|
237
235
|
| `--lz-slide-to` | Indeterminate bar | Slider end position | `300%` |
|
|
238
|
-
| `--lz-ios-fade` | iOS 27 orb | Resting dot opacity | `0.2` |
|
|
239
|
-
| `--lz-ios-min` | iOS 27 orb | Resting dot scale | `0.5` |
|
|
240
|
-
| `--lz-ios-peak` | iOS 27 orb | Glowing dot scale | `1.25` |
|
|
241
236
|
| `--lz-wf-min` | Waveform | Resting bar scale | `0.22` |
|
|
242
237
|
| `--lz-sonar-fade` | Sonar | Ring start opacity | `0.9` |
|
|
243
238
|
| `--lz-note-bob` | Music note | Note bob height | `0.35em` |
|
|
@@ -444,73 +439,6 @@ Variables: `--lz-dot-size` · `--lz-orbit-fade`.
|
|
|
444
439
|
|
|
445
440
|
---
|
|
446
441
|
|
|
447
|
-
### iOS 27 orb
|
|
448
|
-
|
|
449
|
-
**What it is:** an orb of 27 dots where a bright glow travels from the dot being "touched" to the next, spiraling inward like an iOS listening animation. **Good for:** voice assistants, AI thinking, holographic waits.
|
|
450
|
-
|
|
451
|
-
```html
|
|
452
|
-
<lz-ios-27-orb size="64" accent="#64d2ff" color="#bf5af2"></lz-ios-27-orb>
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
```tsx
|
|
456
|
-
<Ios27Orb size={64} accent="#64d2ff" color="#bf5af2" />
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
Attributes: `size` (default `44`) · `accent` (warm pole hue, default `#0a84ff`) · `color` (cool pole hue, default `#f5f5f7`) · `speed`.
|
|
460
|
-
Variables: `--lz-ios-fade` · `--lz-ios-min` · `--lz-ios-peak`.
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
### AI orb
|
|
465
|
-
|
|
466
|
-
**What it is:** a breathing gradient sphere with an orbiting light dot and twinkling sparkles. **Good for:** AI assistants, generative waits, "smart" ready states.
|
|
467
|
-
|
|
468
|
-
```html
|
|
469
|
-
<lz-ai-orb size="64" accent="#bf5af2"></lz-ai-orb>
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
```tsx
|
|
473
|
-
<AiOrb size={64} accent="#bf5af2" />
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
Attributes: `size` (default `44`) · `accent` (default `#0a84ff`) · `color` (sparkles) · `speed`.
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
### AI thinking
|
|
481
|
-
|
|
482
|
-
**What it is:** a rounded thinking field with typing dots wrapped in a rotating accent ring. **Good for:** chat completions, AI replies, waiting on answers.
|
|
483
|
-
|
|
484
|
-
```html
|
|
485
|
-
<lz-ai-thinking size="44" accent="#30d158"></lz-ai-thinking>
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
```tsx
|
|
489
|
-
<AiThinking size={44} accent="#30d158" />
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
Attributes: `size` (default `40`) · `accent` (default `#0a84ff`) · `color` (typing dots) · `speed`.
|
|
493
|
-
Variables: `--lz-surface` (field background).
|
|
494
|
-
|
|
495
|
-
---
|
|
496
|
-
|
|
497
|
-
### AI neural
|
|
498
|
-
|
|
499
|
-
**What it is:** a grid of dots pulsing like an artificial neural network with a diagonal activation wave. **Good for:** neural nets, model training, data pipelines.
|
|
500
|
-
|
|
501
|
-
```html
|
|
502
|
-
<lz-ai-neural rows="4" cols="7" accent="#fa114f"></lz-ai-neural>
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
```tsx
|
|
506
|
-
<AiNeural rows={4} cols={7} accent="#fa114f" />
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
Attributes: `size` (default `6`) · `rows` (default `3`) · `cols` (default `5`) · `gap` (default `10`) · `accent` (checking neurons) · `color` (resting neurons) · `speed`.
|
|
510
|
-
Variables: `--lz-grid-gap` · `--lz-grid-min` · `--lz-grid-fade`.
|
|
511
|
-
|
|
512
|
-
---
|
|
513
|
-
|
|
514
442
|
### Eyes
|
|
515
443
|
|
|
516
444
|
**What it is:** two cartoon eyes that look side to side and blink. **Good for:** fun apps, "watching" moments, kids' stuff.
|