Created
September 30, 2020 12:36
-
-
Save strinkaus-gd/f28ddc710832156595a8e7b1e28a4fb9 to your computer and use it in GitHub Desktop.
Framer CrossFade Page Effect Override
This file contains 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
// from Addison Schulz @framer https://github.com/addisonschultz/pagination | |
export function CrossFadeEffect(): Override { | |
return { | |
effect(info) { | |
return { | |
opacity: 1 - Math.abs(info.normalizedOffset), | |
x: -info.offset, | |
} | |
}, | |
} | |
} | |
// since the page component uses an offset value to animate between pages, you'll still see in-between pages on the transition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment