Skip to main content

CSS Scroll Snap Generator

Create smooth scroll-snap effects for carousels and galleries.
Customize direction, alignment, and padding with live preview.

Horizontal Scroll - Try scrolling!
1
2
3
4
5
6
top0px
right0px
bottom0px
left0px
top0px
right0px
bottom0px
left0px
.scroll-container {
  scroll-snap-type: x mandatory;
  overflow: auto hidden;
}

.scroll-item {
  scroll-snap-align: start;
}

How CSS Scroll Snap Works

Container Properties

scroll-snap-type defines the snap direction and strictness.scroll-padding adds offset from the container edge.

Child Properties

scroll-snap-align controls where items snap (start, center, end).scroll-margin offsets the snap position.

Strictness Options

mandatory always snaps to a point.proximity only snaps when the scroll position is near a snap point.