Sigmoid MotionScroll motion without the JavaScript tax: native CSS scroll timelines, spring and S-curve easings as CSS linear(), reduced motion by default. About 3 kB for a reveal.
pnpm add @sweberdev/sigmoidMost scroll animations still run in JavaScript: a listener measures elements and changes styles on every frame. Browsers can now do this themselves with CSS scroll-driven animations. Sigmoid is a small layer on top of that platform feature. Reveals, parallax and scroll-linked effects run on native view and scroll timelines, and a tiny fallback with the same range maths covers browsers that do not have them yet.
With sigmoid.css you do not even need JavaScript: write data-sigmoid="fade-up" and the browser animates it. The easing curves are the other half: physically correct springs, the logistic S-curve and Bézier curves that work as JavaScript functions and as CSS linear(), also together with Motion, GSAP or Tailwind. When people ask their system for reduced motion, Sigmoid shows the content without moving it.
Example
A short exampleCopy it into your project.
app/page.tsx
import "@sweberdev/sigmoid/sigmoid.css"
import { ease } from "@sweberdev/sigmoid"
import { Reveal, ScrollProgress } from "@sweberdev/sigmoid-react"
export default function Page() {
return (
<>
<ScrollProgress className="fixed inset-x-0 top-0 h-1 bg-black" />
<h1 data-sigmoid="fade-up">No JavaScript needed</h1>
<Reveal as="article" preset="scale-in" easing={ease.bouncy}>
…
</Reveal>
</>
)
}Features
What you getFree under MIT, with Pro on top.
Free, MIT
- Scroll animation on native CSS view and scroll timelines
- Reveal, parallax, scrub and scroll stories
- Zero-JavaScript mode with data attributes
- Springs and curves for Motion, GSAP and Tailwind
- React, Vue and Svelte bindings; about 5 kB
All features in detail
Free, MIT
- reveal, parallax, scrub and a reading progress bar on native CSS view and scroll timelines
- Staggered lists and grids with one option, also in CSS with --sigmoid-index
- track(): scroll progress as a number for counters, video or canvas
- story(): scroll stories with a pinned section and steps, in JavaScript, React or CSS
- Horizontal scrolling on the inline axis, for carousels and galleries
- splitText(): words and characters that arrive one after another, readable by screen readers
- Counters without JavaScript: data-sigmoid="count"
- Linked animations: one element drives others, and pinned sections with one attribute
- Zero-JavaScript mode: data-sigmoid attributes in one stylesheet
- A small fallback with the same range maths as the CSS spec, also inside scroll containers, tested against the native path in Chromium, Firefox and WebKit
- Physically correct springs, the logistic S-curve and Bézier curves as functions and as CSS linear()
- Curves usable with Motion, GSAP, CSS transitions and as a Tailwind CSS v4 theme
- A curve editor on packages.sweber.dev: tune, copy as CSS or Tailwind, share by link
- prefers-reduced-motion respected by default
- React components and hooks: Reveal, Parallax, ScrollProgress, useScrub, useStory
- Vue 3 directives and composables: v-reveal, v-parallax, useScrollProgress, useStory
- Svelte actions: use:reveal, use:parallax, use:track, use:story, and a guide for Astro
- About 3.2 kB for a reveal, 4.9 kB for everything, checked in CI
- A public benchmark against GSAP ScrollTrigger, Motion and AOS that you can run yourself, and migration guides from all three
- A stable API: semantic versioning, a deprecation policy and tests that pin every export
FAQ
QuestionsShort answers.
Why not just use Motion or GSAP?
Both are excellent and do far more: layout animations, gestures, timelines. If you only need scroll-linked motion and good curves, Sigmoid lets the browser do the work and stays around 3 kB. Its easing curves also work inside Motion and GSAP.
How does it compare in size and speed?
A reveal is about 3 kB, GSAP with ScrollTrigger about 45 kB and Motion about 23 kB, all minified and gzipped. On a native timeline Sigmoid runs about 1 ms of JavaScript while scrolling. With hundreds of elements animating at once, Chromium's native path costs more main-thread time than GSAP in our headless test, and we say so in the benchmark. The script is in the repository.
Which browsers run it natively?
Browsers with CSS scroll-driven animations, such as Chrome, Edge and Safari 26. Others, Firefox for now, get the JavaScript fallback with the same result. CI checks both paths in real Chromium, Firefox and WebKit on every change. The docs list the details.
Is there a Vue or Svelte package?
Yes. @sweberdev/sigmoid-vue has the v-reveal and v-parallax directives and composables, @sweberdev/sigmoid-svelte has the actions use:reveal, use:parallax, use:track and use:story. Install either next to @sweberdev/sigmoid. Astro needs no adapter, the docs have a guide.
Does it work with Next.js and Server Components?
Yes. The data-sigmoid attributes work in Server Components without client code. The React components are client components that render one element.
What happens with reduced motion?
Reveals and parallax are skipped and the content is shown. Only the reading progress bar stays, because it moves only when the user scrolls.
Articles