comparison / svg-scroll-draw vs framer motionmeasured 2026-08-14
svg-scroll-draw vs Framer Motion
Framer Motion is excellent for React component animations. For scroll-driven effects specifically, svg-scroll-draw does more — at roughly a third of the bytes — and works in any framework.
- svg-scroll-draw
- 11.9 KB
- Framer Motion
- 34.3 KB
- Smaller by
- 2.9×
- Licence
- MIT · MIT
| Measure | svg-scroll-draw2.31.0 | Framer Motion13.1.0 |
|---|---|---|
| Size, min + gzip | 11.9 KB, every API | 34.3 KB, cjs entry |
| Runs in | React, Vue, Svelte, Solid, Angular, Astro, Nuxt, vanilla | React |
| Native CSS path | animation-timeline: view(), when eligible | No |
| Pin, snap, text, video | Built in | No |
| Gestures, exit, layout | No | AnimatePresence, drag, layout |
| License | MIT | MIT |
Bundle size.
Framer Motion's entry beside ours, with the one piece the fade-in below actually imports. The dashed rule is svg-scroll-draw with every API loaded.
All sizes minified + gzipped at level 9, measured 2026-08-14 against framer-motion 13.1.0, svg-scroll-draw 2.31.0 — measured, not estimated. Framer Motion tree-shaking helps but scroll-specific APIs pull in most of the core.
Side-by-side API.
Fade + slide in on scroll
Framer Motion
import { motion, useInView } from 'framer-motion';
import { useRef } from 'react';
function Card() {
const ref = useRef(null);
const inView = useInView(ref, { once: true });
return (
<motion.div
ref={ref}
initial={{ opacity: 0, y: 32 }}
animate={inView
? { opacity: 1, y: 0 }
: { opacity: 0, y: 32 }}
transition={{ duration: 0.6, ease: 'easeOut' }}
>
Content
</motion.div>
);
}svg-scroll-draw
import { scrollReveal }
from 'svg-scroll-draw/reveal';
// Works in React, Vue, Svelte,
// Solid, Astro, Nuxt, or vanilla
scrollReveal('.card', {
from: { opacity: 0, y: 32 },
easing: 'ease-out',
once: true,
});Scrub animation tied to scroll position
Framer Motion
import { useScroll, useTransform,
motion } from 'framer-motion';
function Section() {
const { scrollYProgress } = useScroll({
target: ref,
offset: ['start end', 'end start'],
});
const opacity = useTransform(
scrollYProgress, [0, 1], [0, 1]
);
return (
<motion.div style={{ opacity }}>
Content
</motion.div>
);
}svg-scroll-draw
import { scrollAnimate }
from 'svg-scroll-draw';
scrollAnimate('#section', {
props: { opacity: [0, 1] },
trigger: {
start: 'top bottom',
end: 'bottom top',
},
});CSS variable binding
svg-scroll-draw onlysvg-scroll-drawThe call
import { scrollProgress } from 'svg-scroll-draw/progress';
// Set --scroll-progress (0→1) and --scroll-progress-eased on the element
scrollProgress('#hero', { easing: 'ease-in-out' });styles.cssThe binding
#hero {
/* Drive CSS animations directly from the scroll variable */
opacity: calc(var(--scroll-progress-eased));
transform: translateY(
calc((1 - var(--scroll-progress-eased)) * 40px)
);
background-size:
calc(100% + var(--scroll-progress) * 20%)
auto;
}Feature matrix.
Supported Not supported Partial or extra setup
When Framer Motion is the right call.
- 01
Rich React component animations
Hover states, enter/exit transitions, layout animations, drag — Framer Motion's component model shines for interactive UI beyond scroll.
- 02
AnimatePresence
Exit animations when components unmount. Genuinely hard to do without Framer Motion's lifecycle integration.
- 03
Gesture animations
Drag, pan, tap, hover — Framer Motion's gesture system is unmatched.
- 04
Spring physics
Framer Motion's spring/inertia model is more physics-accurate for complex gesture responses.
More comparisons.
Scroll animations, solved
11.9 KB. Framework-agnostic. MIT. Works everywhere Framer Motion doesn’t.