Skip to content
プロジェクト

esthor/react-native-swipeable-list

GitHubで見る

概要

依存関係なしで使えるReact Native用のスワイプ対応FlatListです。ジェスチャー、クイックアクション、アニメーションを利用できます。シンプルです。

Web・アプリ開発

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
-1
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

react-native-swipeable-list

npm version Downloads License PRs

A zero-dependency, Swipeable FlatList for React-Native with Quick Actions, Gestures, and Animations.

animated screenshot of a swipeable flatlist email inbox mockup using react-native-swipeable-list

Usage

  1. Install the package in your project: npm install react-native-swipeable-list or yarn add react-native-swipeable-list

  2. Import the component into your component: import SwipeableFlatList from 'react-native-swipeable-list';

  3. Pass it a data array. It inherits FlatListProps from the standard FlatList component 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. Type boolean

  • maxSwipeDistance - Maximum distance to open to after a swipe. Type number || (Object => number)

  • renderQuickActions - Callback method to render the view that will be unveiled on swipe. Type renderItemType (which provides index and item, which will be very useful for performing actions on your items)

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)

関連プロジェクトを探す

読み込み中…