comparison / svg-scroll-draw vs aos vs scrollrevealmeasured 2026-08-14
svg-scroll-draw vs AOS vs ScrollReveal
Already on AOS or ScrollReveal? Change one import. svg-scroll-draw/aos reads your existing data-aos markup with no aos.css; svg-scroll-draw/scrollreveal runs your ScrollReveal().reveal() calls under MIT instead of GPL-3.0. Every AOS effect runs live, with its markup to copy, on AOS animation examples.
AOS and ScrollReveal.js put animation config in HTML data attributes. svg-scroll-draw puts it in JavaScript — typed, traceable, and part of a full scroll platform. Both of them are smaller than us, and both do less; the numbers below are measured so you can decide which trade you want.
- AOS → drop-in
- 6.7 → 3.2 KB
- ScrollReveal → drop-in
- 5.6 → 4.7 KB
- ScrollReveal licence
- GPL-3.0 → MIT
- Migrate
- 1 import
| Measure | svg-scroll-draw2.31.0 | AOS2.3.4 | ScrollReveal4.0.9 |
|---|---|---|---|
| Gzip | 6.1 KB reveal · 11.9 KB all | 6.7 KB js + css | 5.6 KB |
| Licence | MIT | MIT | GPL-3.0 |
| Configured in | A typed JS call | HTML data attributes | A JS call |
| Last publish | 2026-08-14 | 2022-06-13 | 2022-06-26 |
| Beyond reveal | Draw, pin, snap, text, video | No | No |
| Drop-in | /aos 3.2 KB · /scrollreveal 4.7 KB | — | — |
Switch from AOS in one line.
Keep every data-aos, data-aos-offset, data-aos-anchor-placement and custom animation you wrote. Delete aos.css: the styles ship inside the module. The browser suite runs AOS 2.3.4 and the drop-in side by side on the same page in Chromium, Firefox and WebKit, and checks that the same elements animate at the same scroll positions with the same computed styles.
ABundler
npm- import AOS from 'aos'; - import 'aos/dist/aos.css'; + import AOS from 'svg-scroll-draw/aos'; AOS.init({ once: true });BNext.js layout
app/layout.tsx (Next.js)import { AOSInit } from 'svg-scroll-draw/aos/react'; // A Server Component is fine: the entry is "use client". // Initialises on mount, cleans up on unmount (StrictMode-safe), // and picks up [data-aos] content from route changes. export default function RootLayout({ children }) { return <html lang="en"><body><AOSInit once />{children}</body></html>; }CLet the CLI do it
terminal# or let it do the edits: imports, script tags, aos.css, package.json npx svg-scroll-draw migrate --dry-run npx svg-scroll-draw migrateDCDN script tag
index.html<!-- remove the aos.js script and the aos.css link, then: --> <script src="https://unpkg.com/svg-scroll-draw/dist/cdn/aos.global.js"></script> <script>AOS.init();</script>
Differences, on purpose
- 1
prefers-reduced-motionshows every element in its final state. - 2
disable: 'mobile'checks viewport width rather than the user agent. - 3Positions are re-measured on
loadso late images do not shift triggers. - 4There is a
destroy()for single-page apps. - 5AOS 3's
mirror,anchorPlacement,aos:in/aos:outevents and class name options work too.
step-by-stepAOS in Next.jsAOS in React
or start freshScroll reveal generator
Switch from ScrollReveal, keep your code.
ScrollReveal is GPL-3.0, with a paid licence for commercial work, and has not shipped since 4.0.9. The drop-in is an independent MIT implementation of the same API: every option, sequences, reset, viewFactor, callbacks, clean / sync / destroy. The browser suite runs ScrollReveal 4.0.9 beside it in Chromium, Firefox and WebKit and checks that every element's inline styles match byte for byte at every scroll stop. 4.7 KB, against 5.6 KB.
ABundler
npm- import ScrollReveal from 'scrollreveal'; + import ScrollReveal from 'svg-scroll-draw/scrollreveal'; ScrollReveal({ distance: '40px' }).reveal('.card', { interval: 80 });BCDN script tag
index.html<!-- replace the scrollreveal script with: --> <script src="https://unpkg.com/svg-scroll-draw/dist/cdn/scrollreveal.global.js"></script> <script>ScrollReveal().reveal('.card');</script>
step-by-stepScrollReveal in React and Next.js
Bundle size.
Read the right row. The AOS drop-in is 3.2 KB with its styles, against AOS's 6.7 KB. But AOS and ScrollReveal are both smaller than svg-scroll-draw’s main entry. They also do considerably less — neither draws SVG paths, pins, snaps, splits text or scrubs video. If all you need is fade-up-on-scroll, they are a perfectly good choice and you should use them. Our svg-scroll-draw/reveal entry point is 6.1 KB if you want just that piece — that is the number worth comparing, not the 11.9 KB figure for every API at once.
All sizes minified + gzipped at level 9, measured 2026-08-14 against aos 2.3.4, scrollreveal 4.0.9, svg-scroll-draw 2.31.0 — measured, not estimated. AOS includes its stylesheet (2.1 KB), which you need.
Side-by-side API.
Fade up on scroll
AOS
<!-- HTML attribute on every element -->
<div data-aos="fade-up"
data-aos-once="true">
Content
</div>
<!-- Init in JS -->
AOS.init({ duration: 800 });ScrollReveal.js
// ScrollReveal.js 4.0.9 (GPL-3.0)
const sr = ScrollReveal({
origin: 'bottom',
distance: '32px',
duration: 800,
once: true,
});
sr.reveal('.card');svg-scroll-draw
import { scrollReveal }
from 'svg-scroll-draw/reveal';
// One import. One call.
scrollReveal('.card');
// Custom config:
scrollReveal('.card', {
from: { opacity: 0, y: 32 },
stagger: 0.08,
once: true,
});Stagger cascade
AOS
<!-- AOS: delay per element in HTML -->
<div data-aos="fade-up"
data-aos-delay="0">A</div>
<div data-aos="fade-up"
data-aos-delay="100">B</div>
<div data-aos="fade-up"
data-aos-delay="200">C</div>ScrollReveal.js
sr.reveal('.card', {
interval: 100,
origin: 'bottom',
});svg-scroll-draw
scrollReveal('.card', {
stagger: 0.1, // seconds
});Feature matrix.
Supported Not supported Partial or extra setup
More comparisons.
One import, and you’re done
No data attributes. No config files. No separate CSS import. Works in React, Vue, Svelte, Solid, Astro, Nuxt.