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
|**speed**|`number`|| A value representing the elements scroll speed. If less than zero scroll will appear slower. If greater than zero scroll will appear faster. |
57
-
|**easing**|`string` or `number[]`|| String representing an [easing preset](#easing-presets) or array of params to supply to a [cubic bezier easing function](#cubic-bezier-easing-function). |
58
-
|**rootMargin**|`object`|| Margin to be applied as the bounds around an element. This will affect when an element is determined to be considered in the viewport. Example: `{ top: 100, right: 100, bottom: 100, left: 100 }`|
59
-
|**disabled**|`boolean`|`false`| Disables parallax effects on individual elements when `true`. |
60
-
|**className**|`string`|| Class names to be added to the outermost parallax element. |
61
-
|**style**|`object`|| Style object to be added to the outermost parallax element. |
62
-
|**tag**|`string`|`div`| HTML element tag name to be applied to the outermost parallax element. |
63
-
|**shouldStartAnimationInitialInView**|`boolean`|`false`| Will start the animation at initial element position if the element is positioned inside the view when scroll is at zero. |
64
-
|**startScroll**|`number`|| Scroll top value to begin the animation. When provided along with `endScroll` relative scroll values will be ignored. |
65
-
|**endScroll**|`number`|| Scroll top value to end the animation. When provided along with `startScroll` relative scroll values will be ignored. |
66
-
67
-
### Props: CSS Effects
68
-
69
-
All props for creating CSS effects are defined by a **_start_** and **_end_** value represented by an `array`
70
-
71
-
```jsx
72
-
<Parallax scale={[start, end]}`/>
73
-
```
74
-
75
-
The **_start_**of an effect begins when the element's original position enters the viewport.
76
-
77
-
- The top of the element enters the bottom of the view.
46
+
# Props
78
47
79
-
The **_end_** of an effect begins when the element's original position exits the viewport.
48
+
Most props to configure a parallax element like CSS effects are documented and managed by the `parallax-controller`.
80
49
81
-
- the bottom ofthe element exits the top of the view.
50
+
[See all the parallax props](https://parallax-controller.vercel.app/docs/usage/props) that this component will accept.
|**translateX**|`string[]` or `number[]`| Start and end translation on x-axis in`%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width. |
86
-
|**translateY**|`string[]` or `number[]`| Start and end translation on y-axis in`%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements height. |
87
-
|**rotate**|`string[]` or `number[]`| Start and end rotation on z-axis in`deg`, `rad`, or `turn`. If no unit is passed `deg` is assumed. |
88
-
|**rotateX**|`string[]` or `number[]`| Start and end rotation on x-axis in`deg`, `rad`, or `turn`. If no unit is passed `deg` is assumed. |
89
-
|**rotateY**|`string[]` or `number[]`| Start and end rotation on y-axis in`deg`, `rad`, or `turn`. If no unit is passed `deg` is assumed. |
90
-
|**rotateZ**|`string[]` or `number[]`| Start and end rotation on z-axis in`deg`, `rad`, or `turn`. If no unit is passed `deg` is assumed. |
91
-
|**scale**|`number[]`| Start and end scale on x-axis and y-axis. |
92
-
|**scaleX**|`number[]`| Start and end scale on x-axis. |
93
-
|**scaleY**|`number[]`| Start and end scale on y-axis. |
94
-
|**scaleZ**|`number[]`| Start and end scale on z-axis. |
95
-
|**opacity**|`number[]`| Start and end opacity value. |
96
-
97
-
#### Easing Presets
98
-
99
-
The following easing values are preset and can be used as easing
100
-
101
-
```jsx
102
-
<Parallax easing="easeInCubic" />
103
-
```
104
-
105
-
```
106
-
ease
107
-
easeIn
108
-
easeOut
109
-
easeInOut
110
-
easeInQuad
111
-
easeInCubic
112
-
easeInQuart
113
-
easeInQuint
114
-
easeInSine
115
-
easeInExpo
116
-
easeInCirc
117
-
easeOutQuad
118
-
easeOutCubic
119
-
easeOutQuart
120
-
easeOutQuint
121
-
easeOutSine
122
-
easeOutExpo
123
-
easeOutCirc
124
-
easeInOutQuad
125
-
easeInOutCubic
126
-
easeInOutQuart
127
-
easeInOutQuint
128
-
easeInOutSine
129
-
easeInOutExpo
130
-
easeInOutCirc
131
-
easeInBack
132
-
easeOutBack
133
-
easeInOutBack
134
-
```
135
-
136
-
#### Cubic Bezier Easing Function
137
-
138
-
Just like with CSS `cubic-bezier(0.2,-0.67,1,-0.62);`, you can supply the 4 params to a custom bezier function.
139
-
140
-
```jsx
141
-
<Parallax easing={[0.2, -0.6, 1, -0.6]} />
142
-
```
52
+
## Props: Component Configuration
143
53
144
-
### Props: Callbacks
54
+
The following props allow some configuration of the react component:
0 commit comments