Giter VIP home page Giter VIP logo

vue-photo-album's Introduction

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

vue-photo-album's People

Contributors

tenthree avatar heyana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.