Every feature, one page.

All four effects and every option value, in one reference. Scroll through it, resize the window, try it with reduced motion on.

Effects

The four motion types, with defaults.

fade

Only opacity changes.

data-nar-motion="fade"

scale-up

Grows from a smaller size to full size.

data-nar-motion="scale-up"

slide-up

Rises from below while fading in.

data-nar-motion="slide-up"

slide-down

Drops from above while fading in.

data-nar-motion="slide-down"

Scale start

Five starting sizes for scale-up.

data-nar-scale-start

Starting size of scale-up. Default 70.

scale-start = 90

Starts at 90% size.

data-nar-motion="scale-up" data-nar-scale-start="90"

scale-start = 80

Starts at 80% size.

data-nar-motion="scale-up" data-nar-scale-start="80"

scale-start = 70

Starts at 70% size.

data-nar-motion="scale-up" data-nar-scale-start="70"

scale-start = 60

Starts at 60% size.

data-nar-motion="scale-up" data-nar-scale-start="60"

scale-start = 50

Starts at 50% size.

data-nar-motion="scale-up" data-nar-scale-start="50"

Slide distance

Every distance step for slide-up and slide-down.

data-nar-slide-distance

Travel distance in px for slide-up and slide-down. 30–150, steps of 10. Default 50.

30px

slide-up, 30px.

slide-up · distance 30

40px

slide-up, 40px.

slide-up · distance 40

50px

slide-up, 50px.

slide-up · distance 50

60px

slide-up, 60px.

slide-up · distance 60

70px

slide-up, 70px.

slide-up · distance 70

80px

slide-up, 80px.

slide-up · distance 80

90px

slide-up, 90px.

slide-up · distance 90

100px

slide-up, 100px.

slide-up · distance 100

110px

slide-up, 110px.

slide-up · distance 110

120px

slide-up, 120px.

slide-up · distance 120

130px

slide-up, 130px.

slide-up · distance 130

140px

slide-up, 140px.

slide-up · distance 140

150px

slide-up, 150px.

slide-up · distance 150

slide-down

Same distance scale, opposite direction.

30px

slide-down, 30px.

slide-down · distance 30

70px

slide-down, 70px.

slide-down · distance 70

110px

slide-down, 110px.

slide-down · distance 110

150px

slide-down, 150px.

slide-down · distance 150

Timing

Start and end windows, plus long content.

data-nar-motion-start / -end

When, within the element's time on screen, the animation starts and ends. 0–100, steps of 5. Defaults 10 and 50. Percentages are relative to each element's own timeline.

start 0 · end 20

Finishes almost immediately.

start=0 end=20

start 0 · end 50

Custom timing window.

start=0 end=50

start 0 · end 100

Plays across the whole time on screen.

start=0 end=100

start 10 · end 50

Custom timing window.

start=10 end=50

start 20 · end 60

Custom timing window.

start=20 end=60

start 30 · end 70

Custom timing window.

start=30 end=70

start 50 · end 100

Starts late, ends at the bottom.

start=50 end=100

start 75 · end 100

Starts late, ends at the bottom.

start=75 end=100

Long content

Same values, taller element: the animation stretches over a longer scroll distance.

Tall card

This card is much taller than the others, so its time on screen is longer. The same percentages therefore map to a longer scroll distance, and the animation feels slower, even though the attributes are identical. This card is much taller than the others, so its time on screen is longer. The same percentages therefore map to a longer scroll distance, and the animation feels slower, even though the attributes are identical. This card is much taller than the others, so its time on screen is longer. The same percentages therefore map to a longer scroll distance, and the animation feels slower, even though the attributes are identical. This card is much taller than the others, so its time on screen is longer. The same percentages therefore map to a longer scroll distance, and the animation feels slower, even though the attributes are identical.

start=10 end=50

Combinations

Options work together. Also: will-change and wrapper elements.

scale-up + timing

Scale 50, window 0–60.

scale-start=50 start=0 end=60

slide-down + distance + timing

100px, window 5–40.

distance=100 start=5 end=40

slow fade

Fade across the full pass.

fade start=0 end=100

will-change opt-in

Promotes the element to its own layer up front.

data-nar-motion-will-change

Using your own transform

translate and scale are independent properties, so they can clash with your own. Put your transform on an inner element.

I have my own rotate(-3deg)
<div data-nar-motion="slide-up">
  <div style="transform: rotate(-3deg)">...</div>
</div>

Notes

Accessibility and support.

Accessibility

If your OS is set to reduce motion, every example on this page appears fully visible with no animation. Browsers without scroll-driven animations show the content as normal.

Browsers

Chromium 115+ and Safari 26+ support scroll-driven animations; Firefox support is behind a flag at the time of writing. See the README for details.