All Projects → rap2hpoutre → Vue Picture Swipe

rap2hpoutre / Vue Picture Swipe

Licence: mit
🖼 Vue Picture Swipe Gallery (a gallery of image with thumbnails, lazy-load and swipe) backed by photoswipe

Projects that are alternatives of or similar to Vue Picture Swipe

Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+9067.39%)
Mutual labels:  swipe, gallery, carousel
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+535.4%)
Mutual labels:  swipe, gallery, carousel
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 (-44.72%)
Mutual labels:  gallery, carousel, swipe
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+509.32%)
Mutual labels:  swipe, gallery, carousel
React Siema
ReactSiema Demo
Stars: ✭ 90 (-72.05%)
Mutual labels:  component, gallery, carousel
skeleton-carousel
Carousel component. Horizontal and vertical swipe navigation
Stars: ✭ 31 (-90.37%)
Mutual labels:  gallery, carousel, swipe
React Viewer
react image viewer, supports rotation, scale, zoom and so on
Stars: ✭ 502 (+55.9%)
Mutual labels:  picture, gallery
Vue Picture Input
Mobile-friendly picture file input Vue.js component with image preview, drag and drop, EXIF orientation, and more
Stars: ✭ 862 (+167.7%)
Mutual labels:  picture, component
V Viewer
Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
Stars: ✭ 1,776 (+451.55%)
Mutual labels:  picture, gallery
vue-product-carousel
Simple product carousel with hot image replacement, Zoom and Swipe mode
Stars: ✭ 37 (-88.51%)
Mutual labels:  carousel, swipe
Recent Images
Do you noticed the new feature of Telegram or Instagram?! They show your latest images when you try to attach or post a picture. So I developed this library the same with lots of customization. Simple way to get all images of device based on date taken, name, id and other customization
Stars: ✭ 182 (-43.48%)
Mutual labels:  picture, gallery
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (-87.89%)
Mutual labels:  carousel, swipe
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (+27.02%)
Mutual labels:  picture, gallery
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+1036.96%)
Mutual labels:  picture, gallery
Telegramgallery
world level Gallery , from Telegram,Photo album selector,QQ style
Stars: ✭ 1,294 (+301.86%)
Mutual labels:  picture, gallery
React Native Swiper Flatlist
👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox
Stars: ✭ 217 (-32.61%)
Mutual labels:  swipe, carousel
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (-73.6%)
Mutual labels:  gallery, carousel
react-native-image-page
react-native image-carousel with zoom-pan gestures and full-screen support, work on both iOS and Android
Stars: ✭ 19 (-94.1%)
Mutual labels:  gallery, carousel
ngx-image-gallery
Probably the best Angular 4+ modal and inline image gallery. Angular upgrade for ng-image-gallery.
Stars: ✭ 80 (-75.16%)
Mutual labels:  gallery, carousel
React Touch Carousel
Ultra-customizable carousel framework for React.JS
Stars: ✭ 158 (-50.93%)
Mutual labels:  swipe, carousel

Vue Picture Swipe Gallery

Codacy Badge npm download npm version Package Quality vue2 MIT License

This component is a simple wrapper for the awesome Photoswipe. It's a Vue plugin that displays a gallery of image with swipe function (and more). Includes lazy (smart) loading (mobile friendly) and thumbnails.

Demo

Install

npm install --save vue-picture-swipe

Usage

You can use it as you want. Here are some examples if you want to use it inline, or in a .vue file component or even with Laravel.

Inline usage

You can using it inline:

<vue-picture-swipe :items="[
    {src: 'http://example.org/xl.jpg',thumbnail: 'http://example.org/sm1.jpg',w: 600,h: 400, title: 'Will be used for caption'},
    {src: 'http://example.org/xxl.jpg',thumbnail: 'http://example.org/sm2.jpg',w: 1200,h: 900}
  ]"></vue-picture-swipe>

Just remember to register the component:

import VuePictureSwipe from 'vue-picture-swipe';
Vue.component('vue-picture-swipe', VuePictureSwipe);

new Vue({
  el: '#app'
})

Usage in another component

Create a component Example.vue. Then paste this:

<template>
  <vue-picture-swipe :items="items"></vue-picture-swipe>
</template>
<script>
  import VuePictureSwipe from 'vue-picture-swipe';
  export default {
    data() {
      return {
        items: [{
          src: 'http://via.placeholder.com/600x400',
          thumbnail: 'http://via.placeholder.com/64x64',
          w: 600,
          h: 400,
          alt: 'some numbers on a grey background' // optional alt attribute for thumbnail image
        },
        {
          src: 'http://via.placeholder.com/1200x900',
          thumbnail: 'http://via.placeholder.com/64x64',
          w: 1200,
          h: 900
        }
      ]};
    }
  }
</script>

Usage with Laravel

Edit resources/assets/js/app.js and add this just before the new Vue lines.

import VuePictureSwipe from 'vue-picture-swipe';
Vue.component('vue-picture-swipe', VuePictureSwipe);

Then run your watcher:

npm run watch

Advanced usage

PhotoSwipe options

Use options for Photoswipe options.

<!-- Disable "share" buttons. -->
<vue-picture-swipe :options="{shareEl: false}"></vue-picture-swipe>

PhotoSwipe instance

You can access the PhotoSwipe instance via setting a ref, the instance object is exposed as pswp.

<vue-picture-swipe ref="pictureSwipe"></vue-picture-swipe>
this.$refs.pictureSwipe.pswp

Events

open Attributes Listen to Description
Open none @open Emitted after gallery opens
Close none @close Emitted after gallery closes

Why?

I did not found any vue component that uses thumbnail (smaller version of images) and is mobile-friendly (swipe)

  • This one is documented (and issued) in chinese only and has no thumbnails. Edit: I translated the readme (with google translate) and submitted a PR that was accepted, so now, the documentation is in english)
  • This one is documented (and issued) in chinese too and has no thumbnails either.
  • This one has no documentation.
  • This one is a kind of fork of the previous one
  • ...

So I created mine.

Source: https://xkcd.com/927/

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].