← All notes

CSS scroll snap: finish scrolling at declared positions

Answer: CSS Scroll Snap allows well-controlled scroll experiences by declaring scroll snapping positions.

Why authors use it

You mark snap positions so a scroll operation can end on a meaningful boundary.

Paginated articles and image carousels are the usual examples.

Each scroll container can be given boundaries at which to finish.

Setting it up

Image galleries or slide-like layouts often want content to snap to the scrollport.

Add scroll-snap-type on the scroll container to turn the behavior on.

The default strictness is proximity, so the scroller snaps when it can.

Set mandatory if the scroller should always snap.

On each item, scroll-snap-align can be start, end, or center.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Well-controlled scrolling with CSS Scroll Snap; web.dev, Overflow. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: web.dev, Well-controlled scrolling with CSS Scroll Snap; web.dev, Overflow. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0.

Cite this

Permanent ID: iil:note:c7c0zazf

iinventedlight. 2026. "CSS scroll snap: finish scrolling at declared positions." iinventedlight Library, iil:note:c7c0zazf, version of 2026-11-23. https://iinventedlight.com/library/notes/css-scroll-snap/. License: CC-BY-4.0.

@misc{iil_note_c7c0zazf,
  author = {{iinventedlight}},
  title = {{CSS scroll snap: finish scrolling at declared positions}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/css-scroll-snap/},
  note = {Permanent ID iil:note:c7c0zazf. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/css-scroll-snap.md.