Skip to content
Web Design & Development

Scroll Snap: What Actually Works

CSS that makes a scroll container settle on defined positions, used for carousels, galleries and full-screen sections without JavaScript.

Marcus Adeyemi Technical Director 2 min read 24 views
Scroll Snap: What Actually Works

Where most projects go wrong

The usual mistakes:

  • Mandatory snapping on long vertical pages
  • Snap points that make parts of content unreachable
  • Carousels with no visible controls
  • Assuming scroll snap handles accessibility

What good looks like instead

  • Use scroll snap for horizontal galleries and carousels
  • Prefer proximity for vertical content
  • Keep keyboard and button navigation available
  • Test with trackpads, touch and mouse wheels
  • Make sure content is not hidden between snap points
What to do and what to avoid with scroll snap, side by side
Good practice against the usual mistakes, from the sources listed below.

Why it matters

It provides smooth, native carousel behavior with less code, but it can frustrate users when applied to whole pages or long content.

The specs that matter

Published figures for Scroll Snap
MeasureFigure
Container propertyscroll-snap-type
Item propertyscroll-snap-align
Strictnessmandatory snaps every time; proximity snaps only when close
Browser supportall major browsers

Knowing when to hand it over

Tip: Bring in help when building carousels or galleries that must work across touch, mouse and keyboard.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Web Design & Development