Blurred Scroll with React Native Skia
Wednesday, October 25, 2023
demos
blurred-scroll
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A sophisticated scrolling animation that applies dynamic blur effects based on scroll position. Features smooth transitions and responsive layout adjustments for an engaging visual experience.
What's This About?
This component creates a scrollable list where items dynamically blur and transform based on their position relative to the scroll offset. As users scroll through the list, items smoothly transition between focused and blurred states, creating a depth effect.
Technical Implementation
The component leverages Reanimated for smooth scroll handling and implements:
Dynamic blur effects based on scroll position
Optimized scroll performance with event throttling
Pre-calculated item layouts for smooth scrolling
Responsive sizing based on window dimensions
Fade-in animations for items
Usage
// Core animation setup
const contentOffsetY = useSharedValue(0);
const scrollHandler = useAnimatedScrollHandler({
onScroll: (event) => {
contentOffsetY.value = event.contentOffset.y;
},
});
// Item configuration
<BlurredItem
width={windowWidth}
height={blurredItemContainerHeight}
index={index}
contentOffsetY={contentOffsetY}
/>;
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Blurred Scroll
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback