New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lulo-viewer

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

lulo-viewer

Customizable React image viewer

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

LuloViewer

Customizable React based image viewer. View the DEMO here.

INSERT YOUR GRAPHIC HERE

License

Features

Fully customizable React image viewer. It features image preloader, fullscreen mode, slide animations, zoom and pan and it has a slider that can be used optionally, and even separately.

Installation

From root dir of your project:

$ yarn add lulo-viewer

Usage

import LuloViewer from 'lulo-viewer'

...

const images = [
  'https://upload.wikimedia.org/wikipedia/commons/5/5d/Restless_flycatcher04.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/a/a2/SN1994D.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/b/b6/Felis_catus-cat_on_snow.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/c/ca/Larix_decidua_Aletschwald.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/7/7f/Waschbaer_auf_dem_Dach.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/f/f4/Leaf_1_web.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/0/03/Tavares.Forum.Romanum.redux.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/b/b3/Dolphind.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/c/c2/Martian-Sunset-O-de-Goursac-Curiosity-2013.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/8/8c/Great_Horned_Owl_in_a_Rain_Storm_in_the_Mojave.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/9/9f/Raccoon_climbing_in_tree_-_Cropped_and_color_corrected.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/9/95/Tracy_Caldwell_Dyson_in_Cupola_ISS.jpg',
  'https://upload.wikimedia.org/wikipedia/commons/c/cb/Hellyer_Gorge%2C_Tasmania.jpg',
]

...

<LuloViewer
  imageUrls={images}
  showViewer={true}
  showSlider={true}
  showArrows={true}
  showZoomController={true}
  allowMenu={true}
  allowCyclic={true}
  slideBgdColor="teal"
  randomSlideColors={true}
  slideTransitionDuration={0.3}
/>

Only imageUrls prop is required. LuloViewer will inherit dimensions from it's parent <div>.

Options

PropTypeDescription
imageUrlsarray of stringsArray of image URLs. The only prop you MUST supply. Standard web formats accepted, including animated gif.
showViewerbooleanShow main image screen.
showArrowsbooleanShow arrows on main image screen.
showSliderbooleanShow slider.
showSliderArrowsbooleanShow slider arrows.
showZoomControllerbooleanShow zoom controller.
allowMenubooleanAllow right-click menu.
sliderPositionstringSlider position. It can be 'bottom', 'top', 'left' or 'right'.
arrowsSizenumberSize of main screen arrows. Should be between 0 and 1. Defaults to 0.05.
arrowsPaddingnumberPadding for main arrows in percent of picture div width. Defaults to 5.
sliderSizenumberSlider size as fraction of div dimensions. Should be between 0 and 1. Defaults to 0.12
sliderArrowSizenumberSize of slider arrows as percent of slider size. Defaults to 3.
zoomControllerSizenumberZoom controller size as fraction of div dimensions. Should be between 0 and 1. Defaults to 0.18.
zoomControllerPositionXnumberZoom controller position as fraction of width. Should be between 0 and 1. Defaults to 0.8.
zoomControllerPositionXnumberZoom controller position as fraction of width. Should be between 0 and 1. Defaults to 0.025.
menuSizenumberMenu size in viewer width percent. Defaults to 30.
allowCyclicboolAllows jumping from last to first image and also from first to last.
startingSlidenumberDefaults to 0.
maxPreloadedImagesnumberMaximum number of preloaded images.
slideTransitionDurationnumberDuration of animations in s. Defaults to 0.3.
randomSlideColorsbooleanRandomize slide background colors.
backgroundColorstringBackground color.
arrowDefaultColorstringArrows default color.
arrowHighlightColorstringArrows highlight color.
arrowDisabledColorstringArrows disabled color.
slideBgdColorstringDefault color of unloaded slides. Should be used with randomSlideColors={false}.

License

License

Keywords

image

FAQs

Package last updated on 16 Apr 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