Skip to content

Instantly share code, notes, and snippets.

Last active Jul 25, 2022
What would you like to do?
style={{ x }} // this will change the coordinate of the wrapper as you drag
drag="x" // drag direction
dragConstraints={{ left: -100, right: 100 }} // depends how long of a drag you want to allow
dragSnapToOrigin={true} // will bring the wrapper back to the center upon release
dragElastic={0.1} // adds a more natural feel
whileDrag={{ scale: 1.3 }}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment