0.1.6 • Published 2 years ago

vuejs-image-gallery v0.1.6

Weekly downloads
15
License
MIT
Repository
github
Last release
2 years ago

Vuejs Image Gallery

Developed By Anamol Soman

Downloads Version

Capture4 Capture

Tab ViewMobile View
Capture3Capture2

Vuejs image gallery is a responsive and customizable image gallery.

Features

  • Simple and attractive
  • Customizable
  • Fully Responsive

Tech

Image gallery uses a number of open source projects to work properly:

And of course Dillinger itself is open source with a public repository on GitHub.

Installation

Install the dependencies and devDependencies and start the server.

npm install vuejs-image-gallery

Usage

Import the component like this

import Gallery from "vuejs-image-gallery";

Add the component in your template

 <Gallery
      :images="images"
      :imageWidth="720"
      :imageHeight="auto"
      :popUpMaxWidth="720"
      :mdCols="4"
      :smCols="4"
      :xsCols="6"
      :lgCols="2"
    />

Pass the required data in script

export default {
    name: "App",
    data() {
        return {
            images: [{
                    id: 1,
                    imgSrc: require("@/assets/1.png")
                },
                {
                    id: 2,
                    imgSrc: require("@/assets/2.jpg")
                },
                {
                    id: 3,
                    imgSrc: require("@/assets/3.jpg")
                },
                {
                    id: 4,
                    imgSrc: require("@/assets/4.jpg")
                },
                {
                    id: 5,
                    imgSrc: require("@/assets/5.jpg")
                },
                {
                    id: 6,
                    imgSrc: require("@/assets/6.jpg")
                }
            ]
        };
    },
    components: {
        Gallery
    }
};

In image src you can pass location of your source

Note: `Id should be in proper numbers

Customization

Vuejs image gallery is having some customizable options so you can make changes as per your requirements.

PropsValues
imagesArray of object which contain id and url of image
imageWidthWidth of popup image
imageHeightHeight of popup image
popUpMaxWidthMaximum width of the popup
mdColsNumber of images you want in medium screen size
smColsNumber of images you want in small screen size
xsColsNumber of images you want in extra small screen size
lgColsNumber of images you want in large screen size

License

MIT

Free Software, Hell Yeah!