pretty-review
Install with npm:
npm i pretty-preview
Install with yarn:
yarn add pretty-preview
Install with pnpm:
pnpm add pretty-preview
import PrettyPreview from 'pretty-preview'
import 'pretty-preview/index.css'
new PrettyPreview({
root: '.wrapper'
})
param | type | default | description |
---|---|---|---|
root | HTMLElement | string | document.body | The parent element to listen on. |
selector | string | 'img' | The element to listen on. |
srcAttr | string | 'src' | The property that need to be collected from the selector |
useMask | boolean | true | - |
loop | boolean | false | Enable infinite loop switching between pictures |
MIT License © 2022-PRESENT Humandetail