react-scroll-parallax
Advanced tools
Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4
{ | ||
"name": "react-scroll-parallax", | ||
"version": "2.0.0-alpha.3", | ||
"version": "2.0.0-alpha.4", | ||
"description": "React components to create parallax scroll effects for banners, images or any other DOM elements.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -5,3 +5,3 @@ # React Scroll Parallax | ||
React components to create parallax scroll effects for banners, images or any other DOM elements. Uses a single scroll listener to add **vertical** scrolling based offsets to elements based on their position in the viewport. [Optimized](#optimizations-to-reduce-jank) to _reduce_ jank on scroll and works with universal (server-side rendered) React apps. | ||
React components to create parallax scroll effects for banners, images or any other DOM elements. Uses a single scroll listener to add vertical or horizontal scrolling based offsets to elements based on their position in the viewport. [Optimized](#optimizations-to-reduce-jank) to _reduce_ jank on scroll and works with universal (server-side rendered) React apps. | ||
@@ -46,2 +46,3 @@ ## Examples | ||
- [`<ParallaxProvider>`](#parallaxprovider) | ||
- [ParallaxProvider Props](#parallaxprovider-props) | ||
- [Parallax Controller Context](#parallax-controller-context) | ||
@@ -96,12 +97,12 @@ - [Available Methods](#available-methods) | ||
| Name | Type | Default | Description | | ||
| -------------- | :-----------------------------------: | :------- | ------------------------------------------------------------------------------------------------------------------ | | ||
| **x** | `Array` of types `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. | | ||
| **y** | `Array` of types `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. | | ||
| **className** | `String` | | Optionally pass additional class names to be added to the outermost parallax element. | | ||
| **disabled** | `Boolean` | `false` | Disables parallax effects on individual elements when `true`. | | ||
| **styleInner** | `Object` | | Optionally pass a style object to be added to the innermost parallax element. | | ||
| **styleOuter** | `Object` | | Optionally pass a style object to be added to the outermost parallax element. | | ||
| **tagInner** | `String` | `div` | Optionally pass an element tag name to be applied to the innermost parallax element. | | ||
| **tagOuter** | `String` | `div` | Optionally pass an element tag name to be applied to the outermost parallax element. | | ||
| Name | Type | Default | Description | | ||
| -------------- | :-----------------------------: | :------- | ------------------------------------------------------------------------------------------------------------------ | | ||
| **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. | | ||
| **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. | | ||
| **className** | `String` | | Optionally pass additional class names to be added to the outermost parallax element. | | ||
| **disabled** | `Boolean` | `false` | Disables parallax effects on individual elements when `true`. | | ||
| **styleInner** | `Object` | | Optionally pass a style object to be added to the innermost parallax element. | | ||
| **styleOuter** | `Object` | | Optionally pass a style object to be added to the outermost parallax element. | | ||
| **tagInner** | `String` | `div` | Optionally pass an element tag name to be applied to the innermost parallax element. | | ||
| **tagOuter** | `String` | `div` | Optionally pass an element tag name to be applied to the outermost parallax element. | | ||
@@ -176,2 +177,11 @@ ## \<ParallaxBanner> | ||
### ParallaxProvider Props | ||
The following props configure the `<ParallaxProvider>` component: | ||
| Name | Type | Default | Description | | ||
| ------------------- | :-------: | :--------- | ------------------------------------------------------------------------------------------------------------ | | ||
| **scrollAxis** | `String` | `vertical` | Optionally pass the scroll axis for setting horizontal/vertical scrolling. One of `vertical` or `horizontal` | | ||
| **scrollContainer** | `Element` | `<body>` | Optionally set the container that has overflow and will contain parallax elements. Defaults to the HTML body | | ||
### Parallax Controller Context | ||
@@ -178,0 +188,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18807
255
1