The scroll-snap-type property opts a scroll container into scroll snapping. It sets the snap axis and how strictly snap points are enforced.
The initial value is none. It is not inherited. Children still need scroll-snap-align to create snap positions. Common pairs are x mandatory for carousels and y proximity for softer vertical snapping.
Baseline · Container property.
Standard-track and Widely available since April 2022. Set it on the overflow container, not on each slide. If you name an axis without strictness, proximity is the default.
Scroll vertically.overflow-y: auto makes the box scroll up and down.
Snap on y.scroll-snap-type: y mandatory uses the vertical axis.
Align panels. Each panel’s start edge becomes a snap point.
Useful for sections. Common for onboarding screens or stacked cards.
Edge Cases & Pitfalls
If snapping never happens, the container or the child align is usually missing.
child
Needs scroll-snap-align on targets
Type alone is not enough. Children need scroll-snap-align to create snap positions.
where
Set type on the container
Put scroll-snap-type on the overflow element. Setting it only on slides does not enable snap for the scroller.
axis
Axis must match overflow
Use x with horizontal overflow and y with vertical overflow. A mismatch looks like snapping is broken.
strict
mandatory can feel sticky
Mandatory is great for carousels. For freer reading layouts, try proximity instead.
logical
block and inline follow writing mode
Prefer logical axes when layout may switch writing mode. x and y stay physical.
Compatibility
Browser Support
scroll-snap-type is a browser layout property for scroll snap. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2022
scroll-snap-type
Chrome 69+, Firefox 68+, Safari 11+, Edge 79+, Opera 56+, Samsung Internet 10.1+. Internet Explorer does not support the modern syntax.
97%Modern browsers
Google Chrome69+
Full support
Mozilla Firefox68+
Full support
Apple Safari11+
Full support
Microsoft Edge79+
Full support
Opera56+
Full support
Samsung Internet10.1+
Full support
Internet ExplorerNo modern support
Not supported
scroll-snap-typeWidely supported
Bottom line: Safe for modern carousels and section scrollers. Skip Internet Explorer. Pair with scroll-snap-align on children.
Remember
Key Takeaways
Role: enable snap scrolling on a container by axis and strictness.
Values:none, or an axis plus optional mandatory / proximity.
Initial value:none. Not inherited. Set on the overflow container.
Tip: always add scroll-snap-align on children or nothing will snap.
One line:scroll-snap-type turns on snap for a scroll container — pick an axis, then mandatory or proximity.
Frequently Asked Questions
It opts a scroll container into scroll snapping. You choose an axis (such as x or y) and optional strictness (mandatory or proximity).
none. The container ignores snap points until you set an axis.
mandatory must snap to a snap position when scrolling settles. proximity may snap when the scroll position is close enough; the browser decides.
On the scroll container — the element with overflow that holds the snap targets. Children need scroll-snap-align to create snap positions.
No. Set it on the container that scrolls. If you specify an axis without strictness, proximity is the default strictness.
It is Baseline and widely available since April 2022: Chrome 69+, Firefox 68+, Safari 11+, Edge 79+, Opera 56+. Internet Explorer does not support the modern syntax. It is a browser layout property, not a Node.js feature.