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

Color Picker with React Native Skia

Wednesday, October 18, 2023
enzomanuelmangano
demos
skia-color-picker
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A high-performance color picker component using Skia for rendering.

What's This About?

This component creates an interactive color picker using Skia for optimal performance. It features a responsive canvas that adapts to the screen width, customizable blur effects, and real-time color updates. The implementation provides smooth color selection with gesture handling, making it suitable for applications requiring precise color picking capabilities.

Technical Implementation

The component uses:
Skia rendering
Gesture handling
Blur effects
Color updates
Screen adaptation

Usage

// Basic usage <SkiaColorPicker /> // Color picker with custom props <ColorPicker canvasSize={windowWidth} blur={20} onColorUpdate={(color) => { // Handle color updates console.log(color); }} /> // With gesture handler root <GestureHandlerRootView style={{ flex: 1 }}> <ColorPicker canvasSize={windowWidth} blur={20} onColorUpdate={handleColorUpdate} /> </GestureHandlerRootView> // Window dimensions const { width: canvasSize } = useWindowDimensions();

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Skia Color Picker

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