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

react-native-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37K
increased by5.94%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-lightbox

Installation

npm install --save react-native-lightbox

This module requires React Native 0.11 or later*

Usage

var Lightbox = require('react-native-lightbox');

var LightboxView = React.createClass({
  render: function() {
    return (
      <Lightbox>
        <Image
          style={{ height: 300 }}
          source={{ uri: 'http://knittingisawesome.com/wp-content/uploads/2012/12/cat-wearing-a-reindeer-hat1.jpg' }}
        />
      </Lightbox>
    );
  },
});

Manual Opening & Closing

The component exposes the open and close methods. Smack a ref on the <Lightbox> and you're good to go. This is probably quite useful if you're doing a custom header.

render: function() {
  return (
    <Lightbox ref="lightbox"></Lightbox>
  );
},
handleSomething: function() {
  this.refs.lightbox.open();
}

Properties

PropTypeDescription
activePropsobjectOptional set of props applied to the content component when in lightbox mode. Usable for applying custom styles or higher resolution image source.
headerelementCustom header instead of default with X button
onClosefunctionTriggered when lightbox is closed
onOpenfunctionTriggered when lightbox is opened
underlayColorstringColor of touchable background, defaults to black
swipeToDismissboolEnables gestures to dismiss the fullscreen mode by swiping up or down, defaults to true.

Demo

Demo

Example

Check full example in the Example folder.

License

MIT License. © Joel Arvidsson

Keywords

FAQs

Package last updated on 28 Aug 2015

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