You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

transitions-all-settled

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

transitions-all-settled

This package exports a single function that accepts an HTML node and returns a promise. The promise resolves when all CSS transitions on the HTML node and its children have settled.


Version published
Maintainers
1
Created

Readme

Source

Transitions All Settled

This package exports a single function that accepts an HTML node and returns a promise. The promise resolves when all CSS transitions on the HTML node and its children have settled.

This is useful for exit animations to wait for all CSS transitions to settle before removing the node from the DOM.

Usage

import {transitionsAllSettled} from "transitions-all-settled"

await transitionsAllSettled(node)
// do something else

Installation

This package is on NPM so you can install it using your favorite package manager. There are quite a few these days, so I'll only show the npm way in this readme.

npm install transitions-all-settled

If you are not using a bundler, first, well done, second, you can grab this code using an HTTP import.

import {transitionsAllSettled} from "https://esm.run/transitions-all-settled"

How it Works

The term "settled" means that if a node received a transitionstart event, it also received a transitionend or transitioncancel event. This function keeps track of each transitioning css attribute and waits for it to settle.

The package is very small. Take a look at the source to see exactly how it works.

Authored by James Kerr

FAQs

Package last updated on 07 Mar 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc