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
|**x**|`Array` of `String`or `Number`|`[0, 0]`|Offsets on x-axis in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width. |
104
-
|**y**|`Array` of `String`or `Number`|`[0, 0]`|Offsets on y-axis in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width. |
105
-
|**className**|`String`|| Optionally pass additional class names to be added to the outermost parallax element. |
106
-
|**disabled**|`Boolean`|`false`| Disables parallax effects on individual elements when `true`. |
107
-
|**styleInner**|`Object`|| Optionally pass a style object to be added to the innermost parallax element. |
108
-
|**styleOuter**|`Object`|| Optionally pass a style object to be added to the outermost parallax element. |
109
-
|**tagInner**|`String`|`div`| Optionally pass an element tag name to be applied to the innermost parallax element. |
110
-
|**tagOuter**|`String`|`div`| Optionally pass an element tag name to be applied to the outermost parallax element. |
|**x**|`string[]`or `number[]`|`[0, 0]`|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.|
104
+
|**y**|`string[]`or `number[]`|`[0, 0]`|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. |
105
+
|**className**|`string`|| Optionally pass additional class names to be added to the outermost parallax element.|
106
+
|**disabled**|`boolean`|`false`| Disables parallax effects on individual elements when `true`.|
107
+
|**styleInner**|`object`|| Optionally pass a style object to be added to the innermost parallax element.|
108
+
|**styleOuter**|`object`|| Optionally pass a style object to be added to the outermost parallax element.|
109
+
|**tagInner**|`string`|`div`| Optionally pass an element tag name to be applied to the innermost parallax element.|
110
+
|**tagOuter**|`string`|`div`| Optionally pass an element tag name to be applied to the outermost parallax element.|
111
111
112
112
## \<ParallaxBanner>
113
113
@@ -144,22 +144,22 @@ The following are all props that can be passed to the `<ParallaxBanner>` compone
|**className**|`String`|| Optionally pass additional class names to be added to the outermost parallax banner element. |
148
-
|**disabled**|`Boolean`|`false`| Determines if the internal parallax layers will have offsets applied. |
149
-
|**layers**|`Array`|| A required `Array` of `Objects` with layer properties: `[{ amount: 0.1, image: 'foo.jpg' }]`. [See layers prop below](#banner-layers-prop)|
150
-
|**style**|`Object`|| Optionally pass a style object to be added to the outermost parallax banner element. |
147
+
|**className**|`string`|| Optionally pass additional class names to be added to the outermost parallax banner element. |
148
+
|**disabled**|`boolean`|`false`| Determines if the internal parallax layers will have offsets applied. |
149
+
|**layers**|`array`|| A required `array` of `objects` with layer properties: `[{ amount: 0.1, image: 'foo.jpg' }]`. [See layers prop below](#banner-layers-prop)|
150
+
|**style**|`object`|| Optionally pass a style object to be added to the outermost parallax banner element. |
151
151
152
152
### Banner Layers Prop
153
153
154
154
The `layers` prop takes an array of objects that will represent each image (or custom children) of the parallax banner. The following properties describe a layer object:
|**amount**|`Number`|| A value from `-1` to `1` that represents the vertical offset to be applied to the current layer, `0.1` would equal a `10%` offset on the top and bottom. |
159
-
|**children**|`Element`|| Custom layer children provided as a React element, for example `<Video />`|
160
-
|**expanded**|`Boolean`|`true`| Indicate if the layer should be expanded with negative top/bottom margins so the edges will never be visible. |
161
-
|**image**|`String`|| Image source that will be applied as a CSS background image on the layer. |
162
-
|**props**|`Object`|| Props to apply to the layer element. Example: `{ props: style: { background: 'red' }}`|
|**amount**|`number`|| A value from `-1` to `1` that represents the vertical offset to be applied to the current layer, `0.1` would equal a `10%` offset on the top and bottom. |
159
+
|**children**|`ReactElement`|| Custom layer children provided as a React element, for example `<Video />`|
160
+
|**expanded**|`boolean`|`true`| Indicate if the layer should be expanded with negative top/bottom margins so the edges will never be visible. |
161
+
|**image**|`string`|| Image source that will be applied as a CSS background image on the layer. |
162
+
|**props**|`object`|| Props to apply to the layer element. Example: `{ props: style: { background: 'red' }}`|
|**scrollAxis**|`String`|`vertical`| Optionally pass the scroll axis for setting horizontal/vertical scrolling. One of `vertical` or `horizontal`|
185
-
|**scrollContainer**|`Element`|`<body>`| Optionally set the container that has overflow and will contain parallax elements. Defaults to the HTML body |
|**scrollAxis**|`string`|`vertical`| Optionally pass the scroll axis for setting horizontal/vertical scrolling. One of `vertical` or `horizontal`|
185
+
|**scrollContainer**|`HTMLElement`|`<body>`| Optionally set the container that has overflow and will contain parallax elements. Defaults to the HTML body |
0 commit comments