Package Exports
- @dreamsparkx/parallax
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dreamsparkx/parallax) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
apple-tv-parallax
Live Demo: https://dreamsparkx.github.io/apple-tv-parallax/
Install
npm i @dreamsparkx/parallax
API
Step | Description |
---|---|
layers | The images will be stacked on top of each other and the last element/image will be at the top. |
isStatic | When you pass true , it disables the parallex effect, and shows the flattened image instead. (optional) |
style | Pass on css properties (optional) |
className | Pass on className (optional). |
Example
import { Parallax } from '@dreamsparkx/parallax';
<Parallex
layers={[
'/assets/images/back.png',
'/assets/images/front.png',
]}
isStatic={false}
style={{ flex: 0.21, height: 100, textAlign: 'center' }}
/>