Scroll animation performance
Awesome Reveal gives the work to the browser. The browser runs the viewport check and the animation, so the library runs no code on each scroll or on each frame.
Animations on the compositor
Section titled “Animations on the compositor”Without blur, the generated entrance animates only opacity, translate, scale and rotate. These are the properties that the compositor runs. For the cases that run on the main thread, see a start state with blur and an additive keyframe.
No scroll listeners
Section titled “No scroll listeners”Core adds no scroll event listener. The browser runs the viewport check, and the Intersection Observer API calls core only when the visible fraction of an element crosses a threshold.
Do not add will-change
Section titled “Do not add will-change”Do not add will-change for a reveal. The browser treats an animated property as if will-change already names it.
Bundle size
Section titled “Bundle size”@awesome-reveal/core has no dependencies. With reveal() and cascade(), it adds less than 2 kB gzipped to your bundle.
A test in the packages repo checks this size on each change. The test bundles an import of reveal() and cascade() with a Vite production build, which minifies the code. Then it compresses the bundle with gzip. The size applies only to @awesome-reveal/core. The React, Vue and Astro packages use another entry of core, @awesome-reveal/core/adapter.