1.0.5 • Published 6 years ago

lulo-viewer v1.0.5

Weekly downloads
9
License
MIT
Repository
-
Last release
6 years ago

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

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.0-beta.5

6 years ago

0.1.0-beta.4

6 years ago

0.1.0-beta.3

6 years ago

0.1.0-beta.2

6 years ago

0.1.0-beta.1

6 years ago

0.1.0-beta.0

6 years ago