The transitionrun event fires when a CSS transition is first created—before any transition-delay has begun. Learn how it differs from transitionstart, addEventListener vs ontransitionrun, TransitionEvent properties, and five try-it labs.
01
Kind
Instance event
02
Type
TransitionEvent
03
When
Transition created
04
Handler
ontransitionrun
05
Cancelable?
No
06
Status
Baseline Widely
Fundamentals
Introduction
As soon as the browser creates a CSS transition, it fires transitionrun—even if a delay means the element has not started moving yet. Think of it as “the transition is scheduled / running in the delay window,” not “pixels are already changing.”
After the delay ends, you get transitionstart when motion actually begins. If someone cancels during the delay, you may still have seen transitionrun, then transitioncancel instead of start/end.
💡
Beginner tip
With no delay (or a negative delay), MDN says both transitionrun and transitionstart fire. A positive delay is the easiest way to see them as two separate moments.
Concept
Understanding transitionrun
An instance event on elements that participate in CSS Transitions. MDN: it fires when a CSS transition is first created, i.e., before any transition-delay has begun. It is not cancelable.
Created at the start of any delay—motion may not have started yet.
TransitionEvent — includes propertyName, elapsedTime, pseudoElement.
Still fires if the transition is canceled before the delay expires.
Baseline Widely available — solid modern browser support (since Mar 2020).
Foundation
📝 Syntax
Use the event name with addEventListener, or set the handler property:
Transition is running but hasn't necessarily started transitioning yet
How It Works
Adding the driving class creates the transition immediately. With a positive delay, this log appears before the box starts moving.
Example 2 — ontransitionrun Property
MDN’s alternate style using the event handler property.
JavaScript
const el = document.querySelector(".transition");
el.ontransitionrun = () => {
console.log(
"Transition started running, and will start transitioning when the transition delay has expired"
);
};
el.classList.add("grown");
transitionrun is marked Baseline Widely available on MDN (across browsers since March 2020). Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline · Widely available
Element transitionrun
Fires when a CSS transition is first created, before any transition-delay. Not cancelable. Pair with transitionstart to see the delay gap.
FullWidely available
Google Chrome74+
Yes
Mozilla Firefox53+
Yes
Apple Safari13.1+
Yes
Microsoft Edge79+ Chromium (legacy Edge partial)
Yes
Opera62+
Yes
Internet ExplorerNo transitionrun support
Unavailable
transitionrunBaseline
Bottom line: Listen with addEventListener("transitionrun", …). Use a positive delay to separate it from transitionstart; expect run even if cancel happens during delay.
Wrap Up
Conclusion
transitionrun is the earliest CSS transition lifecycle signal—the transition was created, even if delay means motion has not started. Pair it with transitionstart, transitionend, and transitioncancel for a complete picture.
Handle cancel paths that can follow run during delay
Log propertyName when several properties transition
Keep handlers light—this can fire often on busy UIs
❌ Don’t
Assume transitionrun means pixels are already moving
Expect only one event when multiple properties transition
Forget that zero/negative delay makes run and start fire together
Confuse this with CSS Animations / Web Animations APIs
Skip transitionstart if you need “motion began”
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about transitionrun
Transition created—before delay ends, before motion starts.
5
Core concepts
🚀01
Means created
before delay
Event
🎨02
TransitionEvent
property + time
API
⏱️03
vs start
delay gap
Compare
🔔04
addEventListener
preferred
Listen
🎯05
Baseline
widely available
Compat
❓ Frequently Asked Questions
It fires when a CSS transition is first created — that is, before any transition-delay has begun. The transition may still be waiting in its delay period. It is not cancelable.
No. MDN does not mark Element transitionrun as Deprecated, Experimental, or Non-standard. It is Baseline Widely available (across browsers since March 2020).
transitionrun fires when the transition is created (start of any delay). transitionstart fires when the actual animation begins (end of any delay). With no delay or a negative delay, both fire.
A TransitionEvent. Useful read-only properties include propertyName, elapsedTime, and pseudoElement.
Prefer element.addEventListener("transitionrun", handler). You can also set ontransitionrun where supported.
Yes. MDN notes transitionrun still occurs even if the transition is canceled before the delay expires — then you typically see transitioncancel instead of transitionstart/transitionend.
Did you know?
If you cancel during the delay window, you can see transitionrun without ever seeing transitionstart or transitionend—then transitioncancel cleans up the aborted schedule.