PhotoViewer
This component is used to show a sequence of photos
PhotoViewer provides a great way to show a gallery of photos. You can set a caption and description of each photo. User can zoom or drag the photo in viewer.
To control the visibility of the PhotoViewer you have to use conditional rendering. When PhotoViewer is exist on the page - it visible. You should provide closing logic in onClose
callback.
Images
PhotoViewer has a mandatory property images. It requires an array of PhotoViewerImages. You can set caption and description for each image to provide more information about image. This information will be placed in the bottom left corner of the screen.
In cases when the image is not available altText will be visible instead of the image.
PhotoViewerImage
Altrone Options
In Altrone 2.2 PhotoViewer got a new configuration options (read more). To achieve this, you can leverage photoViewer.openDescriptionByDefault
to either show or hide description popup by default for all PhotoViewers.
Properties
Property | Type | Description |
---|---|---|
| List of images | |
|
| Callbacks fires when user wants to close the viewer |
|
| Index of the first image |
| number | Minimum scale value. Default value is |
| number | Maximum scale value. Default value is |
|
| Custom CSS class |
History
Altrone 2.2
:added
openDescriptionByDefault
config option
Altrone 2.1
:added
min
propadded
max
prop
Altrone 2.0
: initial relese
Last updated