The scroll-snap-stop CSS property allows such a possible snap position to "trap" the scrolling operation, forcing the scroll container to stop before the scrolling operation would naturally end.
object.style.scrollSnapStop = "value";
<'scroll-snap-stop'> = normal | always
The scroll container may pass over a snap position defined by this element during the execution of a scrolling operation.
The scroll container must not pass over a snap position defined by this element during the execution of a scrolling operation; it must instead snap to the first of this element's snap positions.