npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lrnwebcomponents/freezeframe

v2.7.7

Published

Ported over from freezeframe.js

Readme

freezeframe.js 3.0.8

freezeframe.js is a script that pauses animated .gifs and enables them to animate on mouse hover / mouse click / touch event, or with trigger / release functions. It supports responsive images and works as a jQuery plugin.

  1. Examples
  2. Files & Dependencies
  3. Basic Usage: jQuery Plugin
  4. Basic Usage: Vanilla JS
  5. Advanced Usage
  6. Options Reference
  7. Function Reference
  8. License
  9. Thanks

Examples

http://ctrl-freaks.github.io/freezeframe.js/

Files & Dependencies

  1. Include the js and css from /build/

Basic Usage: jQuery Plugin

  1. trigger the image you want by selector and run the freezeframe() function.

$('.my_class').freezeframe(); ```

Basic Usage: Vanilla JS

  1. Add freezeframe as a class name on the .gifs you want processed.
  1. ✨Freeze those frames ✨

$(function() { ff = new freezeframe().freeze(); }) ```

Advanced Usage

freezeframe.js exposes public methods to allow for more custom integration. You have the option of manually controlling when freezeframe triggers images, adds support elements, and attaches event handlers. You can also manually trigger and release animation on one image or a group of images. These methods are described in detail in the Function Reference.

Example: trigger logo .gif and manually trigger / release animation:

logo = new freezeframe('#logo'); // setup freezeframe instance with custom selector

logo.trigger(); // trigger images by selector
logo.setup();   // setup support elements
logo.trigger(); // trigger animation
logo.release(); // release animation

Options Reference

Options can be passed to a freezeframe instance on creation in the form of an object or a string. Strings will be interpreted as the selector option.

// Options passed to jQuery plugin
$('.my_class').freezeframe({'animation_play_duration': 2500})

// String as selector option
var ff = new freezeframe('.my_class');

// Object as options
var ff = new freezeframe({
  'selector': '.my_class',
  'animation_play_duration': 3000,
  'non_touch_device_trigger_event': 'hover'
})
  • selector

    type: string
    default: ".freezeframe"

    The selector used to search for .gifs when the trigger() function is run.

  • animation_play_duration

    type: integer
    default: 5000
    options: Infinity

    The number of milliseconds a .gif will animate for when triggered by click / touch event.
    Use Infinity to make the .gif play forever.

  • non_touch_device_trigger_event

    type: string
    default: "hover"
    options: "hover", "click"

    The trigger event to start animation for non-touch devices.

Function Reference

  • freezeframe( options )

    Create a new freezeframe object instance.
    Can be passed options. Strings will be interpreted as the selector option.

    // Default options
    var ff = new freezeframe();
    
    // String as selector option
    var ff = new freezeframe('.my_class');
    
    // Object as options
    var ff = new freezeframe({
    'selector': '.my_class',
    'animation_play_duration': 3000,
    'non_touch_device_trigger_event': 'hover'
    })
  • trigger( selector )

    trigger images to be paused by freezeframe. If run without selector argument, selector in freezeframe options will be used. Can be run multiple times with different selector to group many images, unrelated by selector, in one freezeframe instance.

    ff.trigger();               // use selector in freezeframe options
    ff.trigger('.my_class');    // use custom selector
  • setup()

    Creates and inserts support elements. Can be filtered by selector.

    ff.setup();                 // all images in freezeframe instance
    ff.setup('.my_class');      // filter images by selector

    HTML image before:

    <img class="freezeframe" src="my_image.gif" />

    ...and after:

    <div class="ff-container">
    <canvas class="ff-canvas ff-canvas-ready" width="400" height="250"></canvas>
    <img class="freezeframe ff-setup ff-image ff-image-ready" src="my_image.gif">
    </div>
  • attach( selector )

    Attaches hover / click / touch events based on freezeframe options. Can be filtered by selector.

    ff.attach();                // all images in freezeframe instance
    ff.attach('.my_class');     // filter images by selector
  • trigger( selector )

    Triggers (starts) animation, or restarts animation from the first frame if the .gif is already animating. Can be filtered by selector.

    ff.trigger();               // all images in freezeframe instance
    ff.trigger('.my_class');    // filter images by selector
  • release( selector )

    Releases (stops) animation. Can be filtered by selector.

    ff.release()                // all images in freezeframe instance
    ff.release('.my_class');    // filter images by selector

License

freezeframe.js is released under the terms of the MIT License.

Thanks