Snap points

Snap points are the resting positions a dragged or scrolled element settles into, such as a bottom sheet's half and full heights or a slider's steps.

On release, pick the snap point from the position and the release velocity, then animate there with a spring that starts at the hand's speed, so the hand-off is seamless.

CSS scroll-snap does the same for scroll containers with no JavaScript.

See it live

Related terms