Skip to content

Instantly share code, notes, and snippets.

@strinkaus-gd
Created September 30, 2020 12:36
Show Gist options
  • Save strinkaus-gd/f28ddc710832156595a8e7b1e28a4fb9 to your computer and use it in GitHub Desktop.
Save strinkaus-gd/f28ddc710832156595a8e7b1e28a4fb9 to your computer and use it in GitHub Desktop.
Framer CrossFade Page Effect Override
// 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