Skip to content

davidyaranon/ionic-react-photo-viewer

 
 

Repository files navigation

Ionic React Photo Viewer

Table of Contents

A react component for displaying images adapted to Ionic design.

  • Pinch-to-zoom capability.
  • IonAvatar and IonThumbnail support.
  • Blurred background support (Available for Chrome and Safari).
  • IonHeader integration to adapt it to the native design.
example_dark.mov
example_light.mov
npm install --save @codesyntax/ionic-react-photo-viewer
// import component
import IonPhotoViewer from '@codesyntax/ionic-react-photo-viewer';

// TSX
<IonItem button lines="none" detail={false}>
    <IonAvatar slot="start">
        <IonPhotoViewer
          title="Martin arrantzalea"
          src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Alcedo_Atthis.jpg/1280px-Alcedo_Atthis.jpg"
          licenseKey='your-license-key'
        >
            <img
            src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Alcedo_Atthis.jpg/1280px-Alcedo_Atthis.jpg"
            alt="Martin arrantzalea"
          />
        </IonPhotoViewer>
    </IonAvatar>
    <IonLabel>Martin arrantzalea</IonLabel>
</IonItem>
  • title: string
    • The title of the image.
  • src: string
    • The source of the image in hight quality.
  • licenseKey: string
    • The license key of lightgallery.
  • children: React.ReactNode
    • Img element.

About

Image viewer based on the photoswipe library adapted to Ionic React components. Forked to support different icons in header

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.4%
  • JavaScript 31.9%
  • CSS 14.7%