For the complete documentation index, see llms.txt. This page is also available as Markdown.

Physics

snapPoint()

const snapPoint = (value: number, velocity: number, points: ReadonlyArray<number>): number;

Select a point where the animation should snap to given the value of the gesture and it's velocity.

withSpring(snapPoint(translationX, velocityX, [0, width]))

Last updated

Was this helpful?