Skip to content
All terms
Motion/lexicon/sticky-pin

What is a sticky pin?

also known asscroll pinning · sticky scroll · scrollytelling

A sticky pin fixes an element in place while the surrounding content keeps scrolling, so one visual can anchor a whole sequence of steps.

Key CSSposition: stickytop: 0height: 100vh
PINNED
Step 2
Refine
01
Capture
02
Refine
03
Ship
01 · Definition

You scroll, and something refuses to leave. A phone mockup sits in the middle of the screen while the text beside it moves from step one to step two to step three, and the screen inside the phone changes with it. That is a sticky pin: one element holds its place while the rest of the page keeps flowing past.

The simplest version needs nothing but CSS. Put `position: sticky; top: 0` on an element inside a taller parent. It scrolls like normal until it reaches the offset you gave it, then it stays put until its parent runs out of room. The height of that parent decides how long the pin lasts. For anything fancier, like swapping images per step or scrubbing an animation, designers reach for GSAP ScrollTrigger, Framer Motion's `useScroll`, or the newer CSS scroll-driven animations in browsers that support them.

Why does it work? Scrolling is the one gesture everybody already knows, and pinning turns it into a timeline. You can tell a sequence without turning the page into a slideshow with buttons. The reader keeps control of the pace, and the pinned object gives their eyes something steady to rest on while the story changes around it. When text and visuals move in sync like this, people usually call it scrollytelling, and you will find it in newsroom explainers and in product pages that want to walk you through something complicated.

The trouble is that it breaks in boring ways. If your pin does nothing at all, the usual culprit is an ancestor with `overflow: hidden` or `overflow: auto`, or a parent that is not taller than the sticky element. Pin something taller than the viewport and the bottom of it is cut off and unreachable. Make the scroll distance too long and people feel hijacked, scrolling and scrolling while nothing seems to happen. On small phones there is often no room for a pinned visual and readable text at once. And scroll-linked animation can stutter on low-end devices if you animate the wrong properties.

Accessibility deserves a moment too. Content that only appears at an exact scroll position is easy to miss with find-in-page, with a screen reader, or with a keyboard. Keep the real text in the document, in order, and treat the pinned animation as an enhancement on top of it.

A few habits that make it behave:

  • Give the pin a clear scroll distance, often around 300vh for three or four steps.
  • Drive content from scroll progress or section visibility, not raw pixel values, so it holds up on any screen height.
  • Pin one thing at a time.
  • Wrap the motion in a reduced-motion check and fall back to a plain stacked layout.
  • Test with a real trackpad, a mouse wheel and a phone, because they all feel different.

When you prompt an AI for it, describe the stage and the steps rather than just saying scrollytelling. For example: build a two-column section with four text steps, each one viewport tall, on the left, and a sticky image panel on the right with `top: 10vh` that cross-fades between four images as each step enters the viewport using IntersectionObserver. Under `prefers-reduced-motion`, stack each step with its image inline. Naming the step count, the trigger and the fallback saves you three rounds of corrections.

Use when
  • Multi-step product explainers
  • Editorial features with sequenced visuals
  • Long landing pages where one hero needs to anchor multiple sections
Avoid when
  • Short pages, there's no scroll distance to fill
  • Mobile-first contexts where viewport height is small
02 · Do
  • +Define a clear scroll distance (300vh or 4× viewport)
  • +Provide a fallback for users with reduced motion
  • +Update content based on scroll progress, not raw pixels
03 · Don't
  • −Don't pin more than one element at a time
  • −Don't pin elements taller than the viewport, they'll clip
06 · Common questions

Sticky Pin (Scroll-Pin Storytelling): your questions, answered

What is the simplest way to pin an element on scroll?

Use `position: sticky; top: 0` on the element, inside a parent that is taller than the element. It sticks once it reaches the top offset and releases when the parent ends. No JavaScript needed. Reach for GSAP ScrollTrigger or Framer Motion when content must change per step.

Why is my position: sticky not working?

Almost always an ancestor has `overflow: hidden`, `overflow: auto` or `overflow: scroll`, which changes the scroll container sticky looks at. Other causes are a parent with no extra height, a missing `top` value, or a flex or grid child stretching to the full parent height.

How long should the scroll distance be for a pinned section?

Give each step roughly one viewport of scroll, so a four-step story gets about 300vh to 400vh of travel. Much shorter and the changes feel rushed, much longer and people wonder if the page is stuck. Test it with a real trackpad, since they scroll very differently.

Is scroll pinning bad for accessibility?

It can be if the content only exists at a certain scroll position. Keep the text in the DOM in reading order, respect `prefers-reduced-motion` by falling back to a stacked layout, and make sure keyboard users can reach every step without getting trapped.

Does a sticky pin work on mobile?

Technically yes, practically only sometimes. Small screens rarely have room for a pinned visual plus readable text, and mobile browser toolbars change the viewport height as you scroll. Many teams pin on desktop and stack the steps on phones.

People also ask

More quick answers

Sticky pin vs parallax: what is the difference?

Parallax moves layers at different speeds to fake depth. A sticky pin holds one element still while the rest scrolls. They are often confused, but they solve different problems.

What is scrollytelling?

Scrollytelling is storytelling where scroll position drives what the reader sees, with text, charts or images changing as they move down the page. Sticky pinning is its most common building block.

Is sticky positioning the same as fixed positioning?

No. A fixed element ignores the page flow and stays on screen permanently. A sticky element scrolls normally, then holds its place within its parent until the parent ends.

Can I combine a pinned section with horizontal scrolling?

Yes, that is exactly how horizontal scroll sections work: a pinned stage whose inner track moves sideways as you scroll down. Use it for genuinely sequential content only.

What is a lighter alternative to pinning?

A scroll reveal fades elements in as they arrive and needs far less setup. It does not hold anything in place, but for many marketing pages it is enough.

07 · Related terms
Free and open source

Found this useful? A GitHub star helps other designers find it.

Star on GitHub