will-change

Tells the browser that an element is expected to change soon, allowing the browser to optimize for that change before it happens. Use it sparingly to improve performance for complex animations.

Quick example

.complex-animation {
  will-change: transform, opacity;
  /* hints to the browser to prepare for heavy GPU work */
}

Quick facts

Initial value
auto
Inherited
No
Applies to
all elements
Animation type
discrete

Values

auto

will-change Browser Support

Widely available Since 2020 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

Safe to use without fallbacks.

36+
36+
9.1+
79+
ESC