Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Swipeable FlatList for React-Native with Quick Actions & Animations

License

NotificationsYou must be signed in to change notification settings

b4lk0n/react-native-swipeable-list

 
 

Repository files navigation

npm versionDownloadsLicensePRsBuild status

A Swipeable FlatList for React-Native with Quick Actions & 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

  1. Import the component into your component:

import SwipeableFlatList from 'react-native-swipeable-list';

  1. Pass it a data array. It inheritsFlatListProps from the standardFlatList component from react-native.

It can be passed other props:

  • shouldBounceOnMount (default =true) - To alert the user that swiping is possible, the first row can bounce on component mount. Typeboolean

  • maxSwipeDistance - 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 providesindex anditem, which will be very useful for performing actions on your items)

Example

Check out the example in the/examples folder. Clone this repo, thencd examples && yarn install && yarn start and then eitherreact-native run-ios orreact-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 theSwipeableFlatList component that was removed from react-native's experimental libraries. (See:https://github.com/facebook/react-native/commit/9ca7989f60cc8137705effeaad0f128fa73ed2e4)

About

A Swipeable FlatList for React-Native with Quick Actions & Animations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp