react-pictures-viewer
TypeScript icon, indicating that this package has built-in type declarations

0.7.7 • Public • Published

React Pictures Viewer

A simple react.js library for viewing pictures ⚡️

Uzoma Medium Gif

Installation

Install with npm

  npm install react-pictures-viewer

Install with yarn

  yarn add react-pictures-viewer

Usage/Examples

import PicturesViewer from "react-pictures-viewer";

const data = [
  {
    src: "./large-image.png",
    smallSrc:
      "small-image-png",
  },
]

 <PicturesViewer
    initialImageIndex={0}
    isZoomOnMouseMoveEnabled={false}
    data={data}
/>

Passing a children prop:

<PicturesViewer
    initialImageIndex={0}
    data={data}
>
<div style={{
    position: "absolute",
    top: 10,
    left: 10
}}>Child</div>
</PicturesViewer>

Run with vite.js

  git clone https://github.com/aldovandus/react-pictures-viewer
  cd react-pictures-viewer
  yarn install
  yarn dev

Package Sidebar

Install

npm i react-pictures-viewer

Weekly Downloads

2

Version

0.7.7

License

MIT

Unpacked Size

127 kB

Total Files

64

Last publish

Collaborators

  • aldone