📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

lightbox-alex-react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightbox-alex-react

Touch friendly lightbox gallery for react

1.1.9
latest
Source
npm
Version published
Weekly downloads
18
-56.1%
Maintainers
1
Weekly downloads
 
Created
Source

lightbox-alex-react

Touch friendly lightbox gallery for react

NPM JavaScript Style Guide

Demo Here

Features

  • Navigate through the pictures with keypress (🡄 🡆)
  • Exit with 'esc' key, tap/click on space around image or tap/click on "x"
  • Navigate through the pictures with arrows click (◄ ►)
  • Navigate through the pictures with swipe (⮨ ⮩)
  • Multiple (separated) galleries in one page
  • Counter (#current picture / #gallery)
  • Video support (only mp4 format)

Upcoming Features

  • Visual improvements

If you have any requests post an issue on github and I'll do my best

Install

npm install --save lightbox-alex-react
yarn add --save lightbox-alex-react

Usage

import React, { Component } from 'react'

import Gallery from 'lightbox-alex-react'

const pictures = ['url1', '/path/to/image.jpg']
const mixed = ['url1', '/path/to/image.jpg', 'urlVideo', '/path/to/video.mp4']


class Example extends Component {
  render () {
    return (
      <Gallery files={pictures} thumbnails={thumbnails} />
      <Gallery files={mixed} />
    )
  }
}
props = {
  files: proptypes.array,             // array of src of full res pictures / videos
  thumbnails: proptypes.array,        // (optional) array of src of thumbnails (for each picture), if not the default one is used
  tmbClasses: proptypes.string,       // (optional) classes to apply to the thumbnails
  galleryClasses: proptypes.string    // (optional) classes to apply to the gallery
}

If optional prop is not passed, default value is used

ENJOY!

License

MIT © Aleksandar Gjoreski

Keywords

react

FAQs

Package last updated on 10 Aug 2019

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