Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

animate-css-grid

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animate-css-grid

This small script wraps a CSS grid (or really, any container element) and animates updates to its children. When the grid container, or one of its immediate children, is updated via the addition or removal of a class, the grid will smoothly transition it

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.2K
decreased by-21.17%
Maintainers
1
Weekly downloads
 
Created
Source

Animate CSS Grid

This small script wraps a CSS grid (or really, any container element) and animates updates to its children. When the grid container, or one of its immediate children, is updated via the addition or removal of a class, the grid will smoothly transition its children to their new positions and sizes.

How to use it

const grid = document.querySelector(".grid");

const { stopGridAnimations } = animateMutations(grid, {
  stagger: true,
  duration: 300
});

// later, to remove transitions
stopGridAnimations()

How it works

The script registers a MutationObserver that activates when the grid or one of its immediate children adds or loses a class. It uses the FLIP animation technique to smoothly update the grid.

Caveats

The updates to the grid will have to come from addition or removal of a class. Currently, inline style updates will not trigger transitions.

FAQs

Package last updated on 16 Mar 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc