axi0motion

Scroll rise

Letters float up into place, stretched tall at first, as the text scrolls into view; the scroll drives every frame.

  • enhancer
  • scroll
  • letters
  • stretch
  • since 0.2

Background Studio: tune it below, then copy the code

Your system asks for reduced motion: the demo shows its final state and nothing moves.

Live demo

Scroll rise example

Scroll down in this box

Scroll, and every letter rises.

Controls

0.035
2.2
1
0.55

Code

It follows the controls above: change an option and the code changes with it.

<script src="https://search.axi0.io/axi0/motion/motion.js" defer></script>

<div class="m-demo-scroll" tabindex="0" role="region" aria-label="Scroll inside this box"><p class="m-demo-note">Scroll down in this box</p><p class="m-demo-xl" data-motion="scroll-rise">Scroll, and every letter rises.</p></div>

The wrappers: ScrollRise.tsx (React, TypeScript) and ScrollRise.vue (Vue). Both render the same attributes as the HTML; the loader does the rest.

Options

AttributeDefaultWhat it does
data-motion-stagger0.035Head start of each letter (share of the scroll)
data-motion-stretch2.2Stretch at the start
data-motion-start1Starts when the top reaches (share of the window height)
data-motion-end0.55Ends when the top reaches

Accessibility

The scroll position sets every frame, so the letters follow the reader both ways. Each letter keeps its measured width and moves with transforms only, so nothing reflows; screen readers hear the text once. Text above the end line is simply shown. Reduced motion shows the text in place. Frames run only while the page scrolls and the text is on screen.

Size

scroll-rise.js is 0.8 KB gzip, with text-kit.js 3.2 KB it needs. A page loads the loader (2.9 KB) and core.js (1.4 KB) once, whatever it uses.