Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/interfacekit/react-native-interactive-image-gallery

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/interfacekit/react-native-interactive-image-gallery

  • v0.1.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

A React Native component to display a gallery of images.

iOS Android

Getting started

$ yarn addreact-native-interactive-image-gallery

Mostly automatic installation

$ react-native link react-native-interactive-image-gallery

Manual installation

iOS
  1. In Xcode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-interactive-image-gallery and add RNIKInteractiveImageLibrary.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNIKInteractiveImageLibrary.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<
Android

No additional setup needed.

Usage

import ImageBrowser from 'react-native-interactive-image-gallery'

class Images extends React.PureComponent<Props> {
  render() {
    const imageURLs: Array<Object> = this.props.images.map(
      (img: Object, index: number) => ({
        URI: img.uri,
        thumbnail: img.thumbnail,
        id: String(index),
        title: img.title,
        description: img.description
      })
    )
    return <ImageBrowser images={imageURLs} />
  }
}

API

The <ImageBrowser /> component accepts the following props

Props

PropTypeMandatory
imagesArray<ImageSource>Yes
onPressImageFunction
topMarginnumber
closeTextstring
infoTitleStylesAnimated.View.style
infoDescriptionStylesAnimated.View.style
enableTilt (experimental, iOS only)boolean

Where ImageSource represents

ImageSource

NameTypeMandatory
idstringYes
URIstringYes
thumbnailstringYes
titlestring
descriptionstring

Aknowledgements

Thanks to Eric Vicenti (https://github.com/ericvicenti) and his talk at React Native EU 2017 called "Practical Hacks for delightful interactions" for the inspiration and the iOS animations present in this library

The main idea of the library and some parts of the code were inspired or taken from his presentation, available at this repo.

License

MIT.

Author

Álvaro Medina Ballester <amedina at apsl.net>

Built with 💛 by APSL.

FAQs

Package last updated on 18 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc