Browse documentation
Reference / Interactivity
Will change
Hint that a particular property or scroll position is likely to change soon.
Working example
Inspect the seal
ApprovedUse this hint selectively after measuring an expensive transition. A state variant can limit the time the browser spends preparing a layer.
<details class="group border p-3">
<summary class="cursor-pointer">Inspect the seal</summary>
<span class="mt-3 inline-block bg-black px-3 py-1 text-white motion-safe:group-hover:will-change-transform motion-safe:group-open:animate-pop">Approved</span>
</details>Class reference
| Class | CSS declarations |
|---|---|
will-change-auto | will-change: auto; |
will-change-transform | will-change: transform; |
will-change-scroll-position | will-change: scroll-position; |
will-change-contents | will-change: contents; |
will-change-[opacity] | will-change: opacity; |
View full generated CSS
.will-change-\[opacity\] {
will-change: opacity;
}
.will-change-auto {
will-change: auto;
}
.will-change-contents {
will-change: contents;
}
.will-change-scroll-position {
will-change: scroll-position;
}
.will-change-transform {
will-change: transform;
}