Created
January 15, 2019 20:13
-
-
Save zaidaldabbagh/131b14b40b78c0c7688ced493ececea3 to your computer and use it in GitHub Desktop.
Initializing VanillaTilt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VanillaTilt from 'vanilla-tilt'; | |
... | |
const initTilt = () => { | |
// init tilt | |
VanillaTilt.init(document.querySelector(".card"), { | |
max: 25, | |
speed: 400 | |
}); | |
VanillaTilt.init(document.querySelectorAll(".card")); | |
}; | |
... | |
TODO: Verify if we want to keep tilt effect. | |
setTimeout(()=>{ | |
initTilt(); | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment