Skip to content

1.4.5

Compare
Choose a tag to compare
@3DJakob 3DJakob released this 27 Oct 20:43
· 62 commits to master since this release

This release adds:

swipeRequirementType

What method to evaluate what direction to throw the card on release. 'velocity' will evaluate direction based on the direction of the swiping movement. 'position' will evaluate direction based on the position the card has on the screen like in the app tinder. If set to position it is recommended to manually set swipeThreshold based on the screen size as not all devices will accommodate the default distance of 300px and the default native swipeThreshold is 1px which most likely is undesirably low.

swipeThreshold

The threshold of which to accept swipes. If swipeRequirementType is set to velocity it is the velocity threshold and if set to position it is the position threshold. On native the default value is 1 as the physics works differently there. If swipeRequirementType is set to position it is recommended to set this based on the screen width so cards can be swiped on all screen sizes.

onSwipeRequirementFulfilled

Callback that will be executed when a TinderCard has fulfilled the requirement necessary to be swiped in a direction on release. This in combination with onSwipeRequirementUnfulfilled is useful for displaying user feedback on the card. When using this it is recommended to use swipeRequirementType='position' as this will fire a lot otherwise. It will be called with a single string denoting which direction the user is swiping: 'left', 'right', 'up' or 'down'.

onSwipeRequirementUnfulfilled

Callback that will be executed when a TinderCard has unfulfilled the requirement necessary to be swiped in a direction on release.