Grid Visualizer with React Native Skia 🔢
Wednesday, June 5, 2024
Try the live demo
Scan to try on your device
Need the app?
demos
grid-visualizer
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A dynamic grid component that visualizes numbers through animated square patterns.
What's This About?
This component creates an interactive visualization that displays numbers using a grid of animated squares. When tapped, it generates a random number and animates the grid to form that number's shape. The visualization includes a subtle radial gradient background and uses custom font rendering to create the number patterns, resulting in an engaging and modern display effect.
Technical Implementation
The component uses:
Skia for rendering
Custom font loading
Grid calculations
Gesture handling
Radial gradients
Usage
// Component props
type GridVisualizerProps = {
text: Animated.SharedValue<string | null>;
width: number;
height: number;
hSquaresAmount: number;
vSquaresAmount: number;
scaleFactor: number;
font: SkFont | null;
squareSize: number;
};
// Basic usage
<GridVisualizer
text={text}
width={300}
height={340}
hSquaresAmount={35}
vSquaresAmount={50}
scaleFactor={70}
font={font}
squareSize={2.5}
/>;
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Grid Visualizer
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback