@xinkyy/react-native-swipeable-list
v0.1.5
Published
A zero-dependency Swipeable FlatList for React-Native with Quick Actions, Gestures, and Animations. Fork of react-native-swipeable-list with additional improvements.
Maintainers
Readme
react-native-swipeable-list
A zero-dependency, Swipeable FlatList for React-Native with Quick Actions, Gestures, and Animations.

Features
- ✅ TypeScript 支持 - 完整的类型定义和泛型支持
- ✅ 高性能 - 基于 React Native 的 FlatList 构建
- ✅ 手势友好 - 支持触摸手势和动画
- ✅ 可定制 - 丰富的配置选项和样式定制
- ✅ 跨平台 - 支持 iOS 和 Android
Installation
Install the package in your project:
npm install react-native-swipeable-listoryarn add react-native-swipeable-listImport the component into your component:
import SwipeableFlatList from 'react-native-swipeable-list';Pass it a data array. It inherits FlatListProps from the standard
FlatListcomponent from react-native.
It can be passed additional props:
shouldBounceOnMount(default =true) - To alert the user that swiping is possible, the first row can bounce on component mount. TypebooleanmaxSwipeDistance- Maximum distance to open to after a swipe. Typenumber || (Object => number)renderQuickActions- Callback method to render the view that will be unveiled on swipe. TyperenderItemType(which providesindexanditem, which will be very useful for performing actions on your items)
TypeScript Support
This library now includes full TypeScript support! Check out the TypeScript documentation for detailed usage examples and type definitions.
Example
Check out the example in the /examples folder. Clone this repo, then cd examples && yarn install && yarn start and then either react-native run-ios or react-native run-android to get the app up and running locally. Play with the code and see what you can do! 😎
History & Shoutouts
Started from the SwipeableFlatList component that was removed from react-native's experimental libraries. (See: https://github.com/facebook/react-native/commit/9ca7989f60cc8137705effeaad0f128fa73ed2e4)
Erik Thorelli (original), xink (fork improvements)
Original repo: https://github.com/esthor/react-native-swipeable-list
