Socket
Socket
Sign inDemoInstall

react-scroll-parallax

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-parallax - npm Package Compare versions

Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc