
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A React library for gamification elements like wheels, slots, and coin animations.
Gamified is a toolkit for web developers looking to add engaging gamification and reward systems to their applications. Easily animate rewards like coins or tokens—and soon much more!
https://github.com/user-attachments/assets/099e900e-d461-40ee-a096-5e1472e165cf
https://gamified-example.vercel.app/
Install Gamified via npm:
npm install gamified
The useCollectingAnimation hook allows you to animate the collection of items from one element (the source) to another (the target). It supports a variety of customization options for element size, animation duration, randomness in motion, and more.
Below is a sample usage of the hook in a React component:
import React, { useRef } from 'react';
import { useCollectingAnimation } from 'gamified';
const App = () => {
const sourceRef = useRef(null);
const targetRef = useRef(null);
const { startAnimation, isAnimating, progress, debugInfo } = useCollectingAnimation({
sourceRef,
targetRef,
elements: ['💰'], // Can be strings, numbers, or JSX elements.
count: 20, // Total number of items to animate.
batchCount: 4, // Number of batches to split the animation.
batchDelay: 250, // Delay (in ms) between batches.
elementSize: 40, // Size of each animated element.
onComplete: () => console.log('Animation complete'),
onReached: () => console.log('First element reached the target'),
debug: true,
});
return (
<div>
<div ref={sourceRef} style={{ position: 'absolute', top: 50, left: 50 }}>
Source
</div>
<div ref={targetRef} style={{ position: 'absolute', top: 300, left: 300 }}>
Target
</div>
<button onClick={startAnimation} disabled={isAnimating}>
Start Animation
</button>
<div>Progress: {Math.floor(progress * 100)}%</div>
{debugInfo && <div>Debug: {debugInfo}</div>}
</div>
);
};
export default App;
useCollectingAnimation(options)Parameters:
| Option | Type | Default | Description |
|---|---|---|---|
| sourceRef | RefObject<HTMLElement> | Required | Reference to the source element (starting point) for the animation. |
| targetRef | RefObject<HTMLElement> | Required | Reference to the target element (destination) for the animation. |
| elements | React.ReactNode[] | Required | Array of elements (icons, tokens, etc.) to animate. |
| count | number | 15 | Total number of elements to animate. |
| batchCount | number | 3 | Number of batches to split the animation into. |
| batchDelay | number (ms) | 300 | Delay between each batch in milliseconds. |
| elementSize | number (px) | 30 | Size of each animated element. |
| durationRange | [number, number] | [800, 1500] | Range for animation duration (ms). |
| arcHeightRange | [number, number] | [80, 150] | Range for the arc height (px). |
| pathRandomness | number | 50 | Degree of randomness for the animation path. |
| startOffsetRange | [number, number] | [-15, 15] | Random offset range for the starting position. |
| endOffsetRange | [number, number] | [-20, 20] | Random offset range for the ending position. |
| zIndexRange | [number, number] | [9000, 9100] | Range for the z-index of the animated elements. |
| shrinkAtEnd | number (0-1) | 0.3 | Fraction to shrink the element by the end of the animation. |
| onComplete | () => void | undefined | Callback fired when the entire animation completes. |
| onReached | () => void | undefined | Callback fired when the first element reaches the target (threshold). |
| reachThreshold | number (0-1) | 0.85 | Progress fraction when an element is considered to be "reaching" the target. |
| debug | boolean | false | Enable debug mode to log internal state and animation details. |
Returns:
An object containing:
startAnimation: Function to trigger the animation.isAnimating: Boolean flag indicating if an animation is currently in progress.isReachingTarget: Boolean flag indicating if any element is in the "reaching" state.reachingCount: Number of elements that have reached the threshold.completedCount: Number of elements that have completed their animation.totalCount: Total number of elements scheduled for animation.progress: Overall animation progress as a fraction (completedCount / totalCount).debugInfo: Debug messages when debug mode is enabled.Gamified is only getting started! Upcoming components include:
All new components will follow the same principles of high customizability and composability, making them easy to integrate into any web application.
Contributions are welcome! Feel free to submit issues or pull requests on our GitHub repository.
This project is licensed under the MIT License.
Elevate your application's engagement with Gamified—where every interaction can be a rewarding experience!
FAQs
A React library for gamification elements like wheels, slots, and coin animations.
We found that gamified demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.