Socket
Book a DemoInstallSign in
Socket

@alantoa/lightbox

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alantoa/lightbox

@alantoa/lightbox

0.3.1
latest
Source
npmnpm
Version published
Weekly downloads
237
-14.75%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Lightbox

basic usage

Todo

  • tap to close
  • pinch to zoom (use Reanimated v2 & react-native-gesture-handler v2)
  • web support (use photoswipe )
  • photo gallery (use react-native-pager-view)

Installation

First you have to follow installation instructions of Reanimated v2 and react-native-gesture-handler v2

npm install @alantoa/lightbox

Usage

import { LightBoxProvider, LightBox } from '@alantoa/lightbox';
import { StyleSheet, Image, Dimensions } from 'react-native';
import * as React from 'react';

const { width } = Dimensions.get('window');

export default function App() {
  return (
    <LightBoxProvider>
      <LightBox
        width={width / 3}
        height={width / 3}
        imgLayout={{ width, height: width }}
      >
        <Image
          source={{
            uri: uri,
          }}
          style={StyleSheet.absoluteFillObject}
        />
      </LightBox>
    </LightBoxProvider>
  );
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 06 Jul 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.