react-fade-in-view 1.2.6 → 1.2.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aayush Daboriya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -16,7 +16,7 @@ blogs, and content-heavy websites that need performant viewport animations.
16
16
  - **Lightweight:** No extra animation libraries
17
17
  - **Intersection Observer:** Animates elements on viewport enter
18
18
  - **Simple API:** Easy to use, fully customizable
19
- - **Directional animations:** Up, down, left, right
19
+ - **Directional animations:** Up, down, left, right, fade, zoom
20
20
  - **Optional repeat:** Animate every time or just once
21
21
  - **React & Next.js compatible**
22
22
  - **TypeScript ready**
@@ -69,20 +69,22 @@ export default function FadeInAsHTMLTag() {
69
69
  <FadeIn direction="right">Right Fade</FadeIn>
70
70
  <FadeIn direction="up">Up Fade</FadeIn>
71
71
  <FadeIn direction="down">Down Fade</FadeIn>
72
+ <FadeIn direction="fade">Fade Only</FadeIn>
73
+ <FadeIn direction="zoom">Zoom In</FadeIn>
72
74
  ```
73
75
 
74
76
  ---
75
77
 
76
78
  ## ⚙️ Props
77
79
 
78
- | Prop | Type | Default | Description |
79
- | ----------- | ------------------------------------- | ------- | --------------------------------------------------- |
80
- | `as` | `React.ElementType` | `div` | Element or component to render instead of `div` |
81
- | `direction` | `"up" \| "down" \| "left" \| "right"` | `up` | Fade-in animation direction |
82
- | `className` | `string` | `""` | Optional custom CSS classes |
83
- | `immediate` | `boolean` | `false` | Animate immediately instead of waiting for viewport |
84
- | `children` | `React.ReactNode` | — | Content to animate |
85
- | `...rest` | `any` | — | Pass extra props to the rendered element |
80
+ | Prop | Type | Default | Description |
81
+ | ----------- | --------------------------------------------------------- | ------- | --------------------------------------------------- |
82
+ | `as` | `React.ElementType` | `div` | Element or component to render instead of `div` |
83
+ | `direction` | `"up" \| "down" \| "left" \| "right" \| "fade" \| "zoom"` | `up` | Animation style / direction |
84
+ | `className` | `string` | `""` | Optional custom CSS classes |
85
+ | `immediate` | `boolean` | `false` | Animate immediately instead of waiting for viewport |
86
+ | `children` | `React.ReactNode` | — | Content to animate |
87
+ | `...rest` | `any` | — | Pass extra props to the rendered element |
86
88
 
87
89
  ---
88
90
 
package/dist/index.css CHANGED
@@ -39,6 +39,24 @@
39
39
  transform: translateY(0);
40
40
  }
41
41
  }
42
+ @keyframes fadeIn {
43
+ from {
44
+ opacity: 0;
45
+ }
46
+ to {
47
+ opacity: 1;
48
+ }
49
+ }
50
+ @keyframes zoomIn {
51
+ from {
52
+ opacity: 0;
53
+ transform: scale(0.85);
54
+ }
55
+ to {
56
+ opacity: 1;
57
+ transform: scale(1);
58
+ }
59
+ }
42
60
  .fade-in-left {
43
61
  animation: fadeInLeft 0.6s ease-out forwards;
44
62
  }
@@ -51,6 +69,12 @@
51
69
  .fade-in-down {
52
70
  animation: fadeInDown 0.6s ease-out forwards;
53
71
  }
72
+ .fade-in-fade {
73
+ animation: fadeIn 0.6s ease-out forwards;
74
+ }
75
+ .fade-in-zoom {
76
+ animation: zoomIn 0.6s ease-out forwards;
77
+ }
54
78
  .opacity-0 {
55
79
  opacity: 0;
56
80
  }
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ElementType, ReactNode, ComponentPropsWithoutRef } from 'react';
3
3
 
4
- type Direction = "left" | "right" | "up" | "down";
4
+ type Direction = "left" | "right" | "up" | "down" | "fade" | "zoom";
5
5
  type FadeInProps<T extends ElementType> = {
6
6
  as?: T;
7
7
  direction?: Direction;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ElementType, ReactNode, ComponentPropsWithoutRef } from 'react';
3
3
 
4
- type Direction = "left" | "right" | "up" | "down";
4
+ type Direction = "left" | "right" | "up" | "down" | "fade" | "zoom";
5
5
  type FadeInProps<T extends ElementType> = {
6
6
  as?: T;
7
7
  direction?: Direction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-fade-in-view",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Lightweight fade-in animation component using Intersection Observer",
5
5
  "keywords": [
6
6
  "react",