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

QR Code Generator with React Native Skia

Wednesday, July 19, 2023
enzomanuelmangano
demos
qr-code-generator
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
An interactive QR code generator with gradient effects and customizable styling.

What's This About?

This component creates a dynamic QR code generator with customizable visual effects. Users can input text to generate QR codes that feature gradient colors and adjustable path effects. The implementation includes interactive sliders for controlling visual parameters like deviation and stroke width, making it possible to create unique and visually appealing QR codes.

Technical Implementation

The component uses:
Skia rendering
Gradient effects
Path manipulation
Text input handling
Interactive sliders

Usage

// Basic usage <QRCodeGenerator /> // QR code with effects <QRCode value="reactiive.io" size={windowWidth * 0.9} strokeWidth={strokeWidthProgress} errorCorrectionLevel="H" > <SweepGradient c={vec(windowWidth / 2, windowWidth / 2)} colors={['cyan', 'magenta', 'cyan']} /> <DiscretePathEffect length={10} deviation={deviationProgress} /> </QRCode> // Slider for adjusting effects <Slider initialProgress={0.5} maxValue={6} onUpdate={(progress) => { deviationProgress.value = progress; }} />

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Qr Code Generator

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