Socket
Socket
Sign inDemoInstall

lightbox-alex-react

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lightbox-alex-react

Touch friendly lightbox gallery for react


Version published
Weekly downloads
15
increased by275%
Maintainers
1
Install size
77.4 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 10 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc