1.0.3 • Published 7 years ago
@sil/scroll-parallax
Licence
ISC
Version
1.0.3
Deps
0
Size
20 kB
Vulns
0
Weekly
0
Scroll Parallax
A simple Vue Directive to parallax an element.
Install
Install the package
npm install @sil/scroll-parallax
Import the package
import ScrollParallax from '~/@sil/scroll-parallax
Define the component:
Vue.directive(ScrollParallax);
Use the component with default values:
<any-element v-parallax />
Arguments
| Argument | Default | Description |
|---|---|---|
| debug | false | Show debugging information about this element |
| output | 'translate' | Options: 'translate' / 'property ', Set the value directly on a translate or on a css custom property |
| originalOffset | 0 | Change the initial offset of the element |
| minWidth | 0 | Trigger the parallax from this value. |
| amount | 1.5 | Amount of parallax |