@animateicons/react 0.1.1 → 0.1.3

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 CHANGED
@@ -24,7 +24,7 @@ import { BellRingIcon } from "@animateicons/react/lucide";
24
24
  import { HeartIcon } from "@animateicons/react/huge";
25
25
 
26
26
  export function Notifications() {
27
- return <BellRingIcon size={24} color="#f45b48" />;
27
+ return <BellRingIcon size={24} color="#f45b48" />;
28
28
  }
29
29
  ```
30
30
 
@@ -34,13 +34,13 @@ Hover-to-animate works out of the box. No setup, no providers.
34
34
 
35
35
  ```ts
36
36
  interface IconProps {
37
- size?: number; // default 24
38
- color?: string; // any CSS color (hex, rgb, hsl, var(--token))
39
- className?: string;
40
- style?: React.CSSProperties;
41
- duration?: number; // animation speed multiplier — default 1, 0.5 = 2x faster
42
- isAnimated?: boolean; // default true — false disables hover trigger
43
- // ...all standard HTMLDivElement props
37
+ size?: number; // default 24
38
+ color?: string; // any CSS color (hex, rgb, hsl, var(--token))
39
+ className?: string;
40
+ style?: React.CSSProperties;
41
+ duration?: number; // animation speed multiplier — default 1, 0.5 = 2x faster
42
+ isAnimated?: boolean; // default true — false disables hover trigger
43
+ // ...all standard HTMLDivElement props
44
44
  }
45
45
  ```
46
46
 
@@ -51,19 +51,22 @@ Every icon's ref exposes `startAnimation()` and `stopAnimation()`:
51
51
  ```tsx
52
52
  "use client";
53
53
  import { useRef } from "react";
54
- import { BellRingIcon, type BellRingIconHandle } from "@animateicons/react/lucide";
54
+ import {
55
+ BellRingIcon,
56
+ type BellRingIconHandle,
57
+ } from "@animateicons/react/lucide";
55
58
 
56
59
  export function Bell() {
57
- const ref = useRef<BellRingIconHandle>(null);
58
-
59
- return (
60
- <button
61
- onMouseEnter={() => ref.current?.startAnimation()}
62
- onMouseLeave={() => ref.current?.stopAnimation()}
63
- >
64
- <BellRingIcon ref={ref} size={28} />
65
- </button>
66
- );
60
+ const ref = useRef<BellRingIconHandle>(null);
61
+
62
+ return (
63
+ <button
64
+ onMouseEnter={() => ref.current?.startAnimation()}
65
+ onMouseLeave={() => ref.current?.stopAnimation()}
66
+ >
67
+ <BellRingIcon ref={ref} size={28} />
68
+ </button>
69
+ );
67
70
  }
68
71
  ```
69
72
 
@@ -79,14 +82,14 @@ All icons honor `prefers-reduced-motion` automatically. When the user has reduce
79
82
 
80
83
  ## Compatibility
81
84
 
82
- | Constraint | Supported |
83
- | ----------------- | ------------------------------------ |
84
- | React | 18 or 19 |
85
- | Node (tooling) | ≥ 18.17 |
86
- | Module formats | ESM + CommonJS |
87
- | TypeScript | strict-mode types ship with the package |
88
- | RSC / Next 13–16 | every icon carries a `"use client"` directive |
89
- | Tree-shaking | `sideEffects: false`, ESM imports drop unused icons |
85
+ | Constraint | Supported |
86
+ | ---------------- | --------------------------------------------------- |
87
+ | React | 18 or 19 |
88
+ | Node (tooling) | ≥ 18.17 |
89
+ | Module formats | ESM + CommonJS |
90
+ | TypeScript | strict-mode types ship with the package |
91
+ | RSC / Next 13–16 | every icon carries a `"use client"` directive |
92
+ | Tree-shaking | `sideEffects: false`, ESM imports drop unused icons |
90
93
 
91
94
  Published with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) — every release links back to the GitHub commit that built it.
92
95
 
@@ -0,0 +1 @@
1
+ var l=(...e)=>e.filter(Boolean).join(" ");export{l as a};