Atlas Button with React Native Skia 🪄
Tuesday, June 18, 2024
Try the live demo
Scan to try on your device
Need the app?
demos
atlas-button
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A stylish button component inspired by Atlas design, featuring dynamic color squares that create an engaging visual effect. The button combines SVG icons with animated color patterns for a modern, interactive appearance.
What's This About?
This component creates a button with a dynamic grid of colored squares that respond to interaction. The squares use a carefully selected color palette with varying probabilities, creating a visually appealing pattern that enhances the button's appearance.
Technical Implementation
The component uses Skia for high-performance rendering of the color squares. It implements a sophisticated color distribution system using Float32Arrays and supports custom SVG icons and labels.
Usage
type AtlasButtonProps = {
width: number;
height: number;
label: string;
svgIcon: any;
colors: Float32Array[];
horizontalSquaresAmount: number;
onPress: () => void;
};
// Example usage
<AtlasButton
width={250}
height={200}
label="React Native"
svgIcon={YourSvgIcon}
colors={colors}
horizontalSquaresAmount={50}
onPress={() => {}}
/>;
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Atlas Button
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback