A react library that view photos list easily, and a simple, responsive viewer component for displaying an array of images.
The React Images Viewer is a library that allows users to easily view and display a list of photos using a responsive viewer component. It provides a simple and intuitive way to navigate through an array of images.
To install the React Images Viewer library, you can follow these steps:
npm install react-images-viewer
or
yarn add react-images-viewer
import ImagesViewer from 'react-images-viewer';
<ImagesViewer
backdropCloseable={true}
closeBtnTitle="Close"
enableKeyboardInput={true}
currImg={0}
customControls={[<CustomControl1 />, <CustomControl2 />]}
imgs={[{ src: 'image1.jpg' }, { src: 'image2.jpg' }]}
imgCountSeparator=" / "
isOpen={true}
leftArrowTitle="Previous Image"
onClickPrev={handlePreviousImage}
onClickNext={handleNextImage}
onClose={handleCloseViewer}
onClickImg={handleClickImage}
/>
The React Images Viewer is a useful library for easily displaying and navigating through a list of photos in a responsive viewer component. It provides various customization options and supports keyboard input for intuitive navigation. With the ability to add custom controls and handle navigation callbacks, it offers flexibility in integrating it into different projects.