Sign in to Reactiive

Use your Google or Apple account.
Signing in subscribes you to the newsletter: new content and the occasional promotion. Unsubscribe at any time.
Skip to content

React Native Skia Bottom Sheet Animation ๐Ÿ“œ

Wednesday, April 12, 2023
enzomanuelmangano
demos
skia-bottom-sheet
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A bottom sheet implementation using Skia for high-performance rendering.

What's This About?

This component creates a bottom sheet interface rendered entirely with Skia for optimal performance. It features a full-screen background image with a responsive bottom sheet overlay. The implementation handles window size changes and image fitting, making it suitable for applications requiring smooth interactions with visual content.

Technical Implementation

The component uses:
Skia rendering
Image handling
Window sizing
Touch gestures
Responsive layout

Usage

// Basic usage <SkiaBottomSheet /> // Canvas setup with image <Touchable.Canvas style={{ flex: 1 }} onSize={size} > <Image x={0} y={0} width={imageWidth} height={imageHeight} fit="cover" image={image} /> <BottomSheet window={window} /> </Touchable.Canvas> // Window size handling const size = useSharedValue({ width: 0, height: 0 }); const window = useDerivedValue(() => { return { width: size.value.width, height: size.value.height }; }, [size]); // Image dimensions const imageWidth = useDerivedValue(() => { return window.value.width; }, [window]); const imageHeight = useDerivedValue(() => { return window.value.height; }, [window]);

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Skia Bottom Sheet

Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback