All Projects → sachinchoolur → Lightgallery.js

sachinchoolur / Lightgallery.js

Licence: gpl-3.0
Full featured JavaScript image & video gallery. No dependencies

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to Lightgallery.js

Lightgallery
A customizable, modular, responsive, lightbox gallery plugin.
Stars: ✭ 4,829 (-6.56%)
Mutual labels:  vimeo, html5-video, youtube, lightbox, thumbnails, image-gallery, css-animations, lightbox-gallery-plugin, video-gallery
React Grid Gallery
Justified image gallery component for React
Stars: ✭ 571 (-88.95%)
Mutual labels:  gallery, lightbox, thumbnails
Justified Gallery
Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
Stars: ✭ 1,512 (-70.74%)
Mutual labels:  gallery, thumbnails, css-animations
Plyr
A simple HTML5, YouTube and Vimeo player
Stars: ✭ 20,859 (+303.62%)
Mutual labels:  vimeo, html5-video, youtube
Nanogallery2
a modern photo / video gallery and lightbox [JS library]
Stars: ✭ 488 (-90.56%)
Mutual labels:  gallery, lightbox, thumbnails
hes-gallery
Light, dependency free, responsive gallery script
Stars: ✭ 27 (-99.48%)
Mutual labels:  gallery, lightbox, lightbox-gallery-plugin
php-video-url-parser
A Simple and efficient PHP Video URL Parser that provides you thumbnails and embed codes for various video streaming websites
Stars: ✭ 57 (-98.9%)
Mutual labels:  youtube, vimeo, thumbnails
Gallery shell
📷 Bash Script to generate static responsive image web galleries.
Stars: ✭ 198 (-96.17%)
Mutual labels:  gallery, thumbnails, image-gallery
Ngx Gallery
Angular Gallery, Carousel and Lightbox
Stars: ✭ 417 (-91.93%)
Mutual labels:  youtube, gallery, lightbox
Bigpicture
Lightweight JavaScript image / video viewer. Supports Youtube, Vimeo, etc.
Stars: ✭ 722 (-86.03%)
Mutual labels:  vimeo, youtube, lightbox
react-gallery-carousel
Mobile-friendly gallery carousel 🎠 with server side rendering, lazy loading, fullscreen, thumbnails, touch, mouse emulation, RTL, keyboard navigation and customisations.
Stars: ✭ 178 (-96.56%)
Mutual labels:  gallery, thumbnails, lightbox
angular-super-gallery
AngularJS super image gallery
Stars: ✭ 46 (-99.11%)
Mutual labels:  gallery, thumbnails, image-gallery
Simple React Lightbox
A simple but functional light-box for React.
Stars: ✭ 265 (-94.87%)
Mutual labels:  gallery, lightbox
Vue Image Lightbox
A Vue component to display an image gallery lightbox
Stars: ✭ 258 (-95.01%)
Mutual labels:  lightbox, image-gallery
Rssbox
📰 I consume the world via RSS feeds, and this is my attempt to keep it that way.
Stars: ✭ 492 (-90.48%)
Mutual labels:  vimeo, youtube
Zoomwall.js
A content-focused photo gallery using a horizontal masonry layout that scales up in lightbox mode.
Stars: ✭ 254 (-95.09%)
Mutual labels:  gallery, lightbox
Embera
A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
Stars: ✭ 268 (-94.81%)
Mutual labels:  vimeo, youtube
React Viewer
react image viewer, supports rotation, scale, zoom and so on
Stars: ✭ 502 (-90.29%)
Mutual labels:  gallery, image-gallery
Openwhyd
💎 Like Pinterest, for Music
Stars: ✭ 287 (-94.45%)
Mutual labels:  vimeo, youtube
Angular2 Image Gallery
Image Gallery built with Angular 8+, node.js and GraphicsMagick
Stars: ✭ 288 (-94.43%)
Mutual labels:  gallery, image-gallery

lightgallery.js

travis bower npm

Full featured JavaScript lightbox gallery. No dependencies.

lightgallery

Important notice

  • lightgallery.js has been merged with lightGallery. That means, v2 of lightgallery.js is https://www.lightgalleryjs.com/. if you have a lightgallery.js license, this is valid for lightGallery as well. But, since version 2.0 you need to pass the license key as a plugin option. If you alredy have a license, please contact me at [email protected] for the license key
  • Completely re-wrote from scratch in typescript
  • Moved all modules to the main repo for better maintainability.
  • Dropped IE 8 and 9 support. Let me know if you still need support for IE 8 and 9. I’ll consider adding a plugin to add support if there is enough demand.
  • Website
  • Docs
  • Demos
Any questions, ideas, suggestions about v2? please start a discussion.

New features

  • Pinch to zoom
  • Virtual slides
  • Swipe to close
  • Zoom from the origin
  • Inline gallery
  • Next-generation image formats support(webp, JPEG XL). etc
  • Better customizability
  • Better performance on mobile devices.
  • Dynamically add, remove slides while the gallery is open
  • Comment interface
  • and much more.

How to upgrade

To make the upgrade seamless, v2 follows the API structure as much as possible. But, few settings are removed and a lot of additional settings are added, the way we use public methods is changed slightly and few events are renamed.

Initialization V2 doesn’t require jQuery as a dependancy.

lightGallery(document.getElementById('lightgallery'), {
  plugins: [lgZoom, lgThumbnail,]
  speed: 500
  ... other settings
});

Plugins To avoid polluting global scope, since v2 plugins has to be passed via settings.

lightGallery(document.getElementById(‘’lightgallery), {
    
plugins: [lgZoom, lgAutoplay, lgComment, lgFullscreen , lgHash, lgPager, lgRotate, lgShare, lgThumbnail, lgVideo]
});
  • Removed in-built support for Dailymotion VK. We Will be adding separate plugins for DailyMotion and VK support
  • Added Wistia support
  • HTML videos - Videos can be passed via data-video attribute instead of passing it via hidden div
data-video='{"source": [{"src":"/videos/video1.mp4", "type":"video/mp4"}], "attributes": {"preload": false, "controls": true}}'
  • Events are renamed - Please take a look at the documentation
  • Few settings are added, removed, or renamed. Rather than listing down all the changes here, I’d recommend going through the current settings that you are using and compare them with the new documentation.



Main features

  • Fully responsive.
  • Modular architecture with built in plugins.
  • Touch support for mobile devices.
  • Mouse drag supports for desktops.
  • Double-click/Double-tap to see actual size of the image.
  • Animated thumbnails.
  • Social media sharing.
  • YouTube, Vimeo, Dailymotion, VK and HTML5 video support.
  • 20+ Hardware-Accelerated CSS3 transitions.
  • Dynamic mode.
  • Full screen support.
  • Supports zoom.
  • Browser history API.
  • Responsive images.
  • HTML iframe support.
  • Multiple instances on one page.
  • Easily customizable via CSS (SCSS) and Settings.
  • Smart image preloading and code optimization.
  • Keyboard Navigation for desktop.
  • Font icon support.
  • Rotate, flip images.
  • Accessibility support.
  • And many more.

Browser support

lightgallery supports all major browsers including IE 9 and above.

Installation

Install with NPM

You can install lightgallery.js using the npm package manager.

npm install lightgallery.js

You can also find lightgallery.js on Yarn and Bower.

Yarn

yarn add lightgallery.js

Bower

bower install lightgallery.js --save

CDN

http://www.jsdelivr.com/projects/lightgallery.js

Download from GitHub

You can also directly download lightgallery from GitHub.

Include CSS and JavaScript files

First of all add lightgallery.css in the <head> of the document.

<head>
    <link rel="stylesheet" href="css/lightgallery.css">
</head>

Then include lightgallery.min.js into your document. If you want to include any lightgallery plugin you can include it after lightgallery.min.js.

<body>
    ...

    <script src="js/lightgallery.min.js"></script>

    <!-- lightgallery plugins -->
    <script src="js/lg-thumbnail.min.js"></script>
    <script src="js/lg-fullscreen.min.js"></script>
</body>

Lightgallery also supports AMD, CommonJS and ES6 modules. When you use AMD make sure that lightgallery.js is loaded before lightgallery modules.

require(['./lightgallery.js'], function() {
    require(["./lg-zoom.js", "./lg-thumbnail.js"], function(){
        lightGallery(document.getElementById('lightgallery'));
    });
});

The markup

lightgallery does not force you to use any kind of markup. You can use whatever markup you want. But i suggest you to use the following markup. Here you can find the detailed examples of different kinds of markup.

<div id="lightgallery">
    <a href="img/img1.jpg">
        <img src="img/thumb1.jpg">
    </a>
    <a href="img/img2.jpg">
        <img src="img/thumb2.jpg">
    </a>
    ...
</div>

Call the plugin

Finally you need to initiate the gallery by adding the following code.

<script>
    lightGallery(document.getElementById('lightgallery'));
</script>

Support lightgallery

If you like lightgallery please support the project by staring the repository or tweet about this project.

Resources

Demos

Built in modules

  1. Thumbnail - GItHub - Docs
  2. Autoplay - GItHub - Docs
  3. Video - GItHub - Docs
  4. Fullscreen - GItHub - Docs
  5. Pager - GItHub - Docs
  6. Zoom - GItHub - Docs
  7. Hash - GItHub - Docs
  8. Share - GItHub - Docs
  9. Rotate - GItHub - Docs

License

Commercial license

If you want to use lightgallery.js to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Read more about the commercial license

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].