Last active
May 3, 2023 16:27
-
-
Save malerba118/567cdada1bce81fda5e28eb865ee729e to your computer and use it in GitHub Desktop.
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
const Item = () => { | |
const progress = useScrollProgress() | |
return <motion.div style={{ opacity: progress }} /> | |
} | |
const App = () => { | |
return ( | |
<Scroll.Section | |
start={{ section: 'start', container: 'center' }} | |
end={{ section: 'end', container: 'center' }} | |
> | |
<Item /> | |
<Scroll.Slice start={0} end={0.5}> | |
<Item /> | |
</Scroll.Slice> | |
<Scroll.Slice start={0.5} end={1}> | |
<Item /> | |
</Scroll.Slice> | |
</Scroll.Section> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment