# vue-easy-gallery

> A easy gallery component for vue apps

Latest version **1.3.1** (published 2020-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-easy-gallery
pnpm add vue-easy-gallery
yarn add vue-easy-gallery
bun add vue-easy-gallery
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2020-04-10 |
| First published | 2020-04-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Florian Wenzel |
| Maintainers | xentis |
| Keywords | vue, gallery, thumbnail, blurry |

## Links

- npm: https://www.npmjs.com/package/vue-easy-gallery
- Repository: https://github.com/FlorianWenzel/vue-easy-gallery
- Homepage: https://github.com/FlorianWenzel/vue-easy-gallery#readme
- Issues: https://github.com/FlorianWenzel/vue-easy-gallery/issues
- npm.io page: https://npm.io/package/vue-easy-gallery

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.3.1 (latest) — 2020-04-10
- 1.3.0 — 2020-04-09
- 1.2.1 — 2020-04-05
- 1.2.0 — 2020-04-05
- 1.1.5 — 2020-04-05
- 1.1.3 — 2020-04-04
- 1.1.2 — 2020-04-04
- 1.1.1 — 2020-04-04
- 1.1.0 — 2020-04-04
- 1.0.3 — 2020-04-04

## README

# vue-easy-gallery

A easy to use, responsive gallery vue component.

## Demo

[Example Gallery](https://florianwenzel.github.io/)  
[Example Code](https://github.com/FlorianWenzel/vue-easy-gallery/blob/master/example/GalleryDemo.vue)

## Installation

### NPM

```shell
$ npm i vue-easy-gallery
```

## Usage

### Example

```html
<template>
  <Gallery
    :images="images"
    :per-row="3"
    :options="{border: 'solid thin white'}"
  />
</template>
```

```js
<script>
    import Gallery from "vue-easy-gallery";

    export default {
        components: { Gallery },
        data(){
            return {
                images: [
                    {
                        "src" : "https://myimage.url/img1.jpg",
                        "thumbnail" : "https://myimage.url/img1thumb.jpg",
                        "height" : 4013,
                        "width" : 3581
                    },
                    {
                        "src" : "https://myimage.url/img2.jpg",
                        "thumbnail" : "https://myimage.url/img2thumb.jpg",
                        "height" : 4264,
                        "width" : 2843
                    }
                ]
            }
        }
    }
</script>
```

## Attributes

### per-row

The amount of images per row

```html
<Gallery :images="images" :per-row="3"></Gallery>
```

### images

the images to display

```js
images = [
  {
    //[required] the source of the image
    src: "https://myimage.url/img1.jpg",

    //[required] the hight of the image, required
    height: 4013,

    //[required] the width of the image, required
    width: 3581,

    //[recommended] a less detailed version of the image, will be displayed blurred during loading
    //recommended size is less then 1kb, optional but recommended
    thumbnail: "https://myimage.url/img1thumb.jpg",

    //[optional] Text, that will be displayed at the bottom of the image, optional
    text: "Lorem ipsum dolor sit amet",
  },
];
```

### options

```js
options = {
  //the border around each image, can be used as padding
  border: "solid .5rem transparent", //default: none

  //smoother transitions on window resize
  smoothResize: false,

  //When the image is clicked, the text is toggled visible/invisible
  toggleTextOnClick: false,

  //Organizes images not in rows, but columsn
  vertical: false,
};
```

---
_Source: https://npm.io/package/vue-easy-gallery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
