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
Measuresvg-scroll-draw2.31.0Framer Motion13.1.0
Size, min + gzip11.9 KB, every API34.3 KB, cjs entry
Runs inReact, Vue, Svelte, Solid, Angular, Astro, Nuxt, vanillaReact
Native CSS pathanimation-timeline: view(), when eligibleNo
Pin, snap, text, videoBuilt inNo
Gestures, exit, layoutNoAnimatePresence, drag, layout
LicenseMITMIT
fig. 1 — at a glance · ✓ where one side is clearly ahead
01weigh-in

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.

svg-scroll-draw/revealOne entryWhat the fade-in below imports6.1 KB
svg-scroll-drawyours2.31.0 · every API11.9 KB
Framer MotionCjs entryframer-motion 13.1.034.3 KB
DifferenceΔ 22.4 KB
fig. 2 — the weigh-in, to scale · 2.9× the bytes at the CJS entry

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.

023 tasks

Side-by-side API.

2.1

Fade + slide in on scroll

Framer Motion

Card.tsx20 lines
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

app.js10 lines
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,
});
2.2

Scrub animation tied to scroll position

Framer Motion

Section.tsx17 lines
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

app.js10 lines
import { scrollAnimate }
  from 'svg-scroll-draw';

scrollAnimate('#section', {
  props: { opacity: [0, 1] },
  trigger: {
    start: 'top bottom',
    end:   'bottom top',
  },
});
2.3

CSS variable binding

svg-scroll-draw only

svg-scroll-drawThe call

app.js4 lines
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

styles.css10 lines
#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;
}
0319 rows

Feature matrix.

refFeaturesvg-scroll-drawFramer Motion
Scroll-driven animations
Animate any CSS property
SVG path draw animationFramer Motion does do this — its pathLength / pathOffset / pathSpacing props map onto stroke-dasharray and stroke-dashoffset, normalised 0–1. Paired with useScroll it covers the basic draw. What it has no equivalent for is multi-path stagger orchestration and the native CSS fast path.
Pin / sticky sections
Section snapping
Text split + staggerFramer Motion needs SplitText manually
Animated countersFramer Motion useTransform can do this but requires boilerplate
Video scrub
scrollReveal (one-line preset)
scrollProgress (CSS variable)
Horizontal scroll sections
Honours prefers-reduced-motion by defaultOurs is default-on for scrollDraw, scrollAnimate, scrollReveal, scrollCounter, scrollText, scrollVideo, scrollSnap and Cinematic — but scrollHorizontal opts out by design, and scrollPin/scrollProgress have no reduced-motion path. Framer Motion has useReducedMotion() and MotionConfig reducedMotion="user" — good tooling, but opt-in rather than default.
Native CSS fast pathsvg-scroll-draw uses animation-timeline: view() when eligible
Works outside ReactFramer Motion is React-only
Vue / Svelte / Solid wrappers
Velocity-scaled animation
Works with Lenis smooth scroll
MIT license
Bundle size (gzipped)framer-motion 13.1.0 CJS entry, measured 2026-08-14. Its single bundle is 61.6 KB; a tree-shaken ESM import can be well under both — Framer Motion’s real cost depends heavily on how much of it you use.11.9 KB34.3 KB

Supported Not supported Partial or extra setup

04Their side

When Framer Motion is the right call.

  1. 01

    Rich React component animations

    Hover states, enter/exit transitions, layout animations, drag — Framer Motion's component model shines for interactive UI beyond scroll.

  2. 02

    AnimatePresence

    Exit animations when components unmount. Genuinely hard to do without Framer Motion's lifecycle integration.

  3. 03

    Gesture animations

    Drag, pan, tap, hover — Framer Motion's gesture system is unmatched.

  4. 04

    Spring physics

    Framer Motion's spring/inertia model is more physics-accurate for complex gesture responses.

05The set

More comparisons.

06Verdict

Scroll animations, solved

11.9 KB. Framework-agnostic. MIT. Works everywhere Framer Motion doesn’t.