pretty-preview
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

PrettyPreview

Demo

demo

Install

Install with npm:

npm i pretty-preview

Install with yarn:

yarn add pretty-preview

Install with pnpm:

pnpm add pretty-preview

Usage

import PrettyPreview from 'pretty-preview'
import 'pretty-preview/index.css'

const pp = new PrettyPreview({
  root: '.wrapper'
})

Params

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

License

MIT License © 2022-PRESENT Humandetail

/pretty-preview/

    Package Sidebar

    Install

    npm i pretty-preview

    Weekly Downloads

    0

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    61.6 kB

    Total Files

    12

    Last publish

    Collaborators

    • humandetail