Skip to main content
Home

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 package works with BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
35%
Published
a year ago (0.3.0)

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.

await transitionsAllSettled(node)

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

The term "settled" means that if a node received a transitionstart event, it also received a transitionend or transitioncancel event.

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

Authored by James Kerr

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@jk/transitions-all-settled

Import symbol

import * as transitions_all_settled from "@jk/transitions-all-settled";
or

Import directly with a jsr specifier

import * as transitions_all_settled from "jsr:@jk/transitions-all-settled";

Add Package

pnpm i jsr:@jk/transitions-all-settled
or (using pnpm 10.8 or older)
pnpm dlx jsr add @jk/transitions-all-settled

Import symbol

import * as transitions_all_settled from "@jk/transitions-all-settled";

Add Package

yarn add jsr:@jk/transitions-all-settled
or (using Yarn 4.8 or older)
yarn dlx jsr add @jk/transitions-all-settled

Import symbol

import * as transitions_all_settled from "@jk/transitions-all-settled";

Add Package

npx jsr add @jk/transitions-all-settled

Import symbol

import * as transitions_all_settled from "@jk/transitions-all-settled";

Add Package

bunx jsr add @jk/transitions-all-settled

Import symbol

import * as transitions_all_settled from "@jk/transitions-all-settled";