
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.
react-freezeframe-vite
Advanced tools
React wrapper for freezeframe.js - Modernized for Vite and ES Modules
Modernized React wrapper for freezeframe.js - Built with Vite and ES Modules for modern React applications.
React Freezeframe is a React component that automatically pauses animated GIFs and enables them to start animation on mouse hover, click, or touch events.
npm install react-freezeframe
Peer Dependencies:
react >= 17.0.0react-dom >= 17.0.0freezeframe >= 5.0.0import ReactFreezeframe from 'react-freezeframe';
function App() {
return (
<div>
<h1>My App</h1>
<ReactFreezeframe
src="path/to/animated.gif"
alt="Animated GIF"
options={{
trigger: 'hover',
overlay: true,
responsive: true
}}
/>
</div>
);
}
import ReactFreezeframe from 'react-freezeframe';
function AdvancedExample() {
const handleStart = (items, isPlaying) => {
console.log('GIF started playing:', isPlaying);
};
const handleStop = (items, isPlaying) => {
console.log('GIF stopped playing:', isPlaying);
};
const handleToggle = (items, isPlaying) => {
console.log('GIF toggled:', isPlaying);
};
return (
<div>
{/* Single GIF with custom options */}
<ReactFreezeframe
src="logo.gif"
alt="Company Logo"
options={{
trigger: 'click',
overlay: true,
responsive: false,
warnings: false
}}
onStart={handleStart}
onStop={handleStop}
onToggle={handleToggle}
/>
{/* Multiple GIFs as children */}
<ReactFreezeframe
options={{
trigger: 'hover',
overlay: false,
responsive: true
}}
>
<img src="gif1.gif" alt="First GIF" />
<img src="gif2.gif" alt="Second GIF" />
<img src="gif3.gif" alt="Third GIF" />
</ReactFreezeframe>
</div>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | - | Source URL for the GIF (when not using children) |
alt | string | - | Alt text for the image |
options | FreezeframeOptions | {} | Configuration options |
onStart | (items: Freeze[], isPlaying: boolean) => void | - | Callback when GIF starts playing |
onStop | (items: Freeze[], isPlaying: boolean) => void | - | Callback when GIF stops playing |
onToggle | (items: Freeze[], isPlaying: boolean) => void | - | Callback when GIF toggles state |
children | ReactNode | - | Child elements (alternative to src) |
| Option | Type | Default | Description |
|---|---|---|---|
trigger | 'hover' | 'click' | false | 'hover' | Event that triggers animation |
overlay | boolean | false | Show play icon overlay when paused |
responsive | boolean | true | Make image responsive (100% width) |
warnings | boolean | true | Show console warnings for non-GIF files |
'hover': GIF animates on mouse hover (default)'click': GIF animates on click/tapfalse: No automatic triggers (manual control only)import { useRef } from 'react';
import ReactFreezeframe from 'react-freezeframe';
function ManualControl() {
const freezeframeRef = useRef();
const startAnimation = () => {
freezeframeRef.current?.start();
};
const stopAnimation = () => {
freezeframeRef.current?.stop();
};
const toggleAnimation = () => {
freezeframeRef.current?.toggle();
};
return (
<div>
<ReactFreezeframe
ref={freezeframeRef}
src="animated.gif"
options={{ trigger: false }}
/>
<button onClick={startAnimation}>Start</button>
<button onClick={stopAnimation}>Stop</button>
<button onClick={toggleAnimation}>Toggle</button>
</div>
);
}
<ReactFreezeframe
src="animated.gif"
onStart={(items, isPlaying) => {
console.log('Animation started');
}}
onStop={(items, isPlaying) => {
console.log('Animation stopped');
}}
onToggle={(items, isPlaying) => {
console.log('Animation toggled:', isPlaying);
}}
/>
Import Syntax: Now uses ES Modules
// Old (v4)
const ReactFreezeframe = require('react-freezeframe');
// New (v5)
import ReactFreezeframe from 'react-freezeframe';
Build System: No longer supports Babel/CRA out of the box
React Version: Requires React 17+ (was React 16+)
# Clone the repository
git clone https://github.com/ctrl-freaks/freezeframe.js.git
cd freezeframe.js/packages/react-freezeframe
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run tests (when implemented)
npm test
# Run linting
npm run lint
MIT License - see LICENSE file for details.
Made with ❤️ for the React community
FAQs
React wrapper for freezeframe.js - Modernized for Vite and ES Modules
The npm package react-freezeframe-vite receives a total of 3 weekly downloads. As such, react-freezeframe-vite popularity was classified as not popular.
We found that react-freezeframe-vite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.