Easy to use VueJS component for Photo galleries, built with VueJS and web standards in mind
- Either download or clone this repository
- Run
npm install
this will install all the necessary tools from NPM - Run
npm run dev
this will create the dist folder - Grab the file inside the dist folder and follow the How to use section
This carousel is pretty easy to use. Put the source code inside your page:
<script src="dist/carousel.js"></script>
Add the component to your page:
<div id="your-application-id">
<carousel source="your-api-source"></carousel>
</div>
Try it with a source, for example you can use Json Placeholder
The current state of the component uses an array of photos
object and it expects this attributes:
- albumId
- id
- thumbnailUrl
- title
- url
Be Aware: If you have a different API structure you have to change the code a little bit in particular
you have to change the attributes of selectedPhoto
and of photos
. I will try to make this as dynamic as
possibile but I'm still learning Javascript.
See License file for further details.
See Changelog File for further details.