Particles Button with Reanimated and Skia
Tuesday, April 8, 2025
Scan to try on your device
Need the app?
skia
reanimated
gesture-handler
demos
particles-button
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A minimalistic and performant button component featuring a particle blast effect animation.
This button component is built using Reanimated and Skia. While rendering particles can be computationally expensive without Skia (even with just 20 particles, performance could suffer with more), Skia's Atlas API efficiently renders multiple sprites using the same texture - making it perfect for this use case.
Resources:
Pressto: the subtle scale animation is built on top of pressto ✨
Usage
import { CircularButton } from 'sparks-button';
const App = () => {
return (
<CircularButton
size={48}
blastRadius={48}
onPress={() => {
console.log('Button pressed!');
}}
/>
);
};
Props
The CircularButton component accepts the following props:
type CircularButtonProps = {
size: number; // Size of the circular button
blastRadius: number; // Radius of the blast effect animation
baseIcon?: React.ReactNode; // Custom icon for the base state (defaults to Plus icon)
activeIcon?: React.ReactNode; // Custom icon for the active state (defaults to Check icon)
autoReset?: boolean; // Whether to automatically reset the button state after animation (defaults to true)
onPress?: () => void; // Callback function called when the button is pressed
};
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Particles Button
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback