https://github.com/runjuu/react-native-elastic-swipe
🎏 A simple react native swipe component with elastic effect.
https://github.com/runjuu/react-native-elastic-swipe
elastic react react-native swipe swipe-component
Last synced: 10 months ago
JSON representation
🎏 A simple react native swipe component with elastic effect.
- Host: GitHub
- URL: https://github.com/runjuu/react-native-elastic-swipe
- Owner: runjuu
- License: mit
- Created: 2018-06-03T01:01:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-08T07:24:40.000Z (about 8 years ago)
- Last Synced: 2025-08-30T05:57:20.269Z (10 months ago)
- Topics: elastic, react, react-native, swipe, swipe-component
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-native-elastic-swipe
- Size: 53.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-elastic-swipe
[](https://opensource.org/licenses/mit-license.php)
[](https://github.com/Runjuu/react-native-elastic-swipe/pulls)
[](https://badge.fury.io/js/react-native-elastic-swipe)
A simple react native swipe component with elastic effect.
```bash
npm install react-native-elastic-swipe
```
### Props
```typescript
interface Props {
friction?: number
criticalOffsetX?: number
criticalOffsetY?: number
swipeHorizontally?: boolean
swipeVertically?: boolean
onChangeReachStateOfHorizontal?(isReachedCriticalOffsetX: boolean): void
onChangeReachStateOfVertical?(isReachedCriticalOffsetY: boolean): void
onSwipeMove?(e: GestureResponderEvent, gestureState: PanResponderGestureState): void
onSwipeEnd?(e: GestureResponderEvent, gestureState: PanResponderGestureState): void
shouldSetPanResponder?(e: GestureResponderEvent, gestureState: PanResponderGestureState): boolean
}
```
### Example
```jsx
import Swipe from "react-native-elastic-swipe";
...
render() {
return (
);
}
...
```
### Demo