vue-photo-album

Responsive photo gallery component for Vue
9,198 38
Install
npm install vue-photo-album
Latest Version:1.2.4
Vue:3
License:MIT
Last Updated:Nov 25, 2024
Links: GitHub  ·  npm
Maintainer: tenthree

Vue Photo Album

Vue Photo Album is a responsive photo gallery component for Vue 3. It supports rows, columns, and masonry layouts and customizable renderer components. Inspired by Igor Danchenko / react-photo-album.

NPM Version Bundle Size License MIT

Layouts

  • Rows

    rows layout
  • Columns

    columns layout
  • Masonry

    masonry layout

Install

npm install vue-photo-album

Basic Setup

<script setup>
import { ref } from 'vue'
import { PhotoAlbum } from 'vue-photo-album'

const photos = ref([
  {
    "src": "https://source.unsplash.com/gKXKBY-C-Dk/1080x743",
    "key": "gKXKBY-C-Dk",
    "width": 1080,
    "height": 743,
    "srcSet": [
      {
        "src": "https://source.unsplash.com/gKXKBY-C-Dk/640x440",
        "width": 640,
        "height": 440
      },
      {
        "src": "https://source.unsplash.com/gKXKBY-C-Dk/256x176",
        "width": 256,
        "height": 176
      }
    ]
  },
  {
    "src": "https://source.unsplash.com/75715CVEJhI/1080x1513",
    "key": "75715CVEJhI",
    "width": 1080,
    "height": 1513
    "srcSet": [
      {
        "src": "https://source.unsplash.com/75715CVEJhI/640x896",
        "width": 640,
        "height": 896
      },
      {
        "src": "https://source.unsplash.com/75715CVEJhI/256x359",
        "width": 256,
        "height": 359
      }
    ]
  }
])
</script>

<template>
  <PhotoAlbum :photos="photos" layout="rows" />
</template>

Documentation

More details here https://tenthree.github.io/vue-photo-album

Related Packages

lingallery

A simple image gallery component for Vue.js

33,398 59
vue-my-photos

Simple lightbox component for Vue 3 applications

26,698 52
vue-photoswipe.js

A directive supported plugin for PhotoSwipe in Vue.js components.

2,168 1
@modufolio/media

Media-library UI for Appkit portfolio sites — album sidebar, media grid, inspect...

494 0

Version History

Version Released Vue License
1.2.4 ^3.3.0 MIT
1.2.3 ^3.3.0 MIT
1.2.2 ^3.3.0 MIT
1.2.1 ^3.3.0 MIT
1.2.0 ^3.3.0 MIT