GithubHelp home page GithubHelp logo

pm-gallery's Introduction

Pm-Gallery.js

Pm-Gallery.js - A simple yet powerful responsive image gallery

With pm-Gallery, you can create professional-quality visual content.

  1. Demo page
  2. How usage?
  3. Example
  4. Parameters

How usage?

  1. npm i pm-gallery
  2. Add files:
    HEAD - pm-gallery-style.css
    Scripts - pm-gallery.js
  3. Init:
new PmGallery(".pm-gallery", {});

Example:

<div class="pm-gallery">
    <img src="./images/img-small-1.svg" data-src="./images/img-large-1.svg" alt="img" />
    <img src="./images/img-small-2.svg" data-src="./images/img-large-2.svg" alt="img" />
    <img src="./images/img-small-3.svg" data-src="./images/img-large-3.svg" alt="img" />
</div>

Parameters

Name type Default Value Description
positionPreviews string 'left' 'top' | 'bottom' | 'left'| 'right' Positioning of preview images relative to the gallery
objectFitPicture string 'cover' 'fill' | 'contain' | 'cover' | 'scaleDown' | 'none' Adds the 'object-fit' class for the main image
visiblePreviews boolean true true | false Image preview visibility
onCenterPreviews boolean true true | false Center previews in horizontal mode
pagination boolean false true | false Pagination visibility
swipeSlider boolean true true | false Swipe on main picture
loop boolean false true | false Set to true to enable continuous loop mode
countPreSlides number 4 number Count of preview images
spaceBetween number 10 number Distance between preview images - px
previewWidth number 100 number Width of the preview image - px
previewHeight number 100 number Height of the preview image - px
speedAnimScroll number 300 number Scrolling speed of preview images
breakpoints object {} - Object with parameters for responsive mode Parameters
fullScreen object {} - Object with parameters for fullScreen mode Parameters
borderRadius number | boolean 4 false | count The options adds border radius for images
autoPlay number | boolean false false | count Automatic slide change
animSlide string | boolean false false | 'fade' | 'flipInX' | 'zoomIn' | Animation of the slide change

pm-gallery's People

Contributors

alekseevich-psk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

pm-gallery's Issues

Добавить пагинацию (функционально)

Добавить возможность включения/отключения пагинации, для будущего использования галереи как слайдера.

  • использование пагинации в fullScreen режиме

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.