An easy and simple to use React Native component to render a large to very large list of swipable high performant pages with intelligent guestures responder to cushion rough guestures and detect gestures like pan, pinch and double tap. Supporting both iOS and Android. Free and made possible along with costly maintenance and updates by [Lue Hang](https://www.facebook.com/lue.hang) (the author).
Installations
npm install react-native-smart-gallery
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
20.15.1
NPM Version
10.7.0
Score
39.2
Supply Chain
54.4
Quality
68.5
Maintenance
50
Vulnerability
94.1
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (84.2%)
Objective-C (6.41%)
Ruby (4.4%)
Java (4.07%)
Starlark (0.91%)
Developer
Download Statistics
Total Downloads
47,108
Last Day
19
Last Week
96
Last Month
460
Last Year
6,067
GitHub Statistics
34 Stars
52 Commits
9 Forks
4 Watching
1 Branches
3 Contributors
Package Meta Information
Latest Version
1.2.3
Package Id
react-native-smart-gallery@1.2.3
Unpacked Size
34.61 kB
Size
7.21 kB
File Count
6
NPM Version
10.7.0
Node Version
20.15.1
Publised On
15 Aug 2024
Total Downloads
Cumulative downloads
Total Downloads
47,108
Last day
-26.9%
19
Compared to previous day
Last week
-29.4%
96
Compared to previous week
Last month
46%
460
Compared to previous month
Last year
-28.5%
6,067
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
4
Peer Dependencies
2
React Native Smart Gallery
An easy and simple to use React Native component to render a large to very large list of swipable high performant pages with intelligent guestures responder to cushion rough guestures and detect gestures like pan, pinch and double tap. Supporting both iOS and Android. Check out the docs.
- Supports smart or minimal rendering for very large lists or small.
- Recommended and best used for large lists or used with other touch guestures.
- Includes guestures and important event listeners for pan, pinch, single tap and double tap.
- Includes zoom mode.
- Initial index can be placed anywhere. Supporting both Android and iOS.
- Easily customizable.
- Intelligent scrolling detection to cushion rough swipe guestures.
- Fully supports iOS and PARTIALLY SUPPORTS ANDROID ONLY.
Motivation
Why was this created? In the open source development community, there isn't a single React Native gallery that can efficiently render a very large list of images with the initial index being placed anywhere in the list of images while supporting both Android and iOS. This gallery solves all that along with gestures and important event listeners for pan, pinch, single tap and double tap.
:link: Quick Links
:gem: Install
Type in the following to the command line to install the module.
1$ npm install --save react-native-smart-gallery
or
1$ yarn add react-native-smart-gallery
:tada: Usage Example
Add an import
to the top of the file. At minimal, declare the SmartGallery
component in the render()
method providing an array of data for the images
prop.
1import SmartGallery from "react-native-smart-gallery"; 2 3//... 4render() { 5 return ( 6 <SmartGallery 7 images={[ 8 // Can be used with different image object fieldnames. 9 // Ex. source, source.uri, uri, URI, url, URL 10 { uri: "https://luehangs.site/pic-chat-app-images/beautiful-blond-blonde-hair-478544.jpg" }, 11 { source: { uri: "https://luehangs.site/pic-chat-app-images/beautiful-beautiful-women-beauty-40901.jpg" } }, 12 { uri: "https://luehangs.site/pic-chat-app-images/animals-avian-beach-760984.jpg" }, 13 { URI: "https://luehangs.site/pic-chat-app-images/beautiful-blond-fishnet-stockings-48134.jpg" }, 14 { url: "https://luehangs.site/pic-chat-app-images/beautiful-beautiful-woman-beauty-9763.jpg" }, 15 { URL: "https://luehangs.site/pic-chat-app-images/attractive-balance-beautiful-186263.jpg" }, 16 ]} 17 // onEndReached={() => { 18 // // add more images when scroll reaches end 19 // }} 20 /> 21 ); 22} 23//...
:tada: Performance Optimization List Example
1import SmartGallery from "react-native-smart-gallery"; 2 3//... 4render() { 5 return ( 6 <SmartGallery 7 images={[ 8 { uri: "https://luehangs.site/pic-chat-app-images/beautiful-blond-blonde-hair-478544.jpg", 9 // Optional: Adding a dimensions or height and 10 // width field with the actual width and height 11 // for REMOTE IMAGES will help improve performance. 12 dimensions: { width: 1080, height: 1920 } }, 13 { uri: "https://luehangs.site/pic-chat-app-images/beautiful-beautiful-women-beauty-40901.jpg", 14 dimensions: { width: 1080, height: 1920 } }, 15 { uri: "https://luehangs.site/pic-chat-app-images/animals-avian-beach-760984.jpg", 16 dimensions: { width: 1080, height: 1920 } }, 17 { uri: "https://luehangs.site/pic-chat-app-images/beautiful-blond-fishnet-stockings-48134.jpg", 18 dimensions: { width: 1080, height: 1920 } }, 19 { uri: "https://luehangs.site/pic-chat-app-images/beautiful-beautiful-woman-beauty-9763.jpg", 20 dimensions: { width: 1080, height: 1920 } }, 21 { uri: "https://luehangs.site/pic-chat-app-images/attractive-balance-beautiful-186263.jpg", 22 dimensions: { width: 1920, height: 1080 } }, 23 // ... 24 // ... 25 // ... 26 ]} 27 // onEndReached={() => { 28 // // add more images when scroll reaches end 29 // }} 30 // Change this to render how many items before and after it. 31 loadMinimal={true} 32 loadMinimalSize={2} 33 // Turning this off will make it feel faster 34 // and prevent the scroller to slow down 35 // on fast swipes. 36 sensitiveScroll={false} 37 /> 38 ); 39} 40//...
:book: Full Documentation
Learn more about the installation and how to use this package in the updated documentation page.
:santa: Author
Free and made possible along with costly maintenance and updates by Lue Hang (the author).
:clap: Contribute
Pull requests are welcomed.
:tophat: Contributors
Contributors will be posted here.
:baby: Beginners
Not sure where to start, or a beginner? Take a look at the issues page.
:page_facing_up: License
MIT © Lue Hang, as found in the LICENSE file.
No vulnerabilities found.
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
binaries present in source code
Details
- Warn: binary detected: example/android/gradle/wrapper/gradle-wrapper.jar:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.9
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-smart-gallery
react-native-smart-gallery-ts
react-native-smart-gallery with typescript props
react-native-masonry-list
An easy and simple to use React Native component to render a custom high performant masonry layout for images. It uses a smart algorithm to sort the images evenly as possible according to the index position or fill in as soon as the image is fetched. In
react-native-smart-album-camera-roll
React Native Camera Roll for iOS & Android