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
- id: C1 claim: Scroll Snap declares positions where scrolling should finish. source: S1 evidence: "declaring scroll snapping positions"
- id: C2 claim: Paginated articles and image carousels are common examples. source: S1 evidence: "Paginated articles and image carousels"
- id: C3 claim: Enable snapping by adding scroll-snap-type on the scroll container. source: S2 evidence: "add the scroll-snap-type to the scroll container"
- id: C4 claim: scroll-snap-align can be start, end, or center. source: S2 evidence: "scroll-snap-align property to start , end or center"
Sources
- [S1] Well-controlled scrolling with CSS Scroll Snap. web.dev. https://web.dev/articles/css-scroll-snap . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] Overflow. web.dev. https://web.dev/learn/css/overflow . License: CC-BY-4.0. Accessed 2026-11-23.
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
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.},
}
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.
- css-scroll-snap.schema.json (schema; CC-BY-4.0)
- css-scroll-snap.table.json (table; CC-BY-4.0)
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.