A Vue.js project
npm install vue-image-lightbox-carousel
npm run dev
yarn dev
`Install
#### NPM / Yarn
Install the package:
`
npm install vue-image-lightbox-carousel
yarn add vue-image-lightbox-carousel
`Then import it in your project
`javascript
import VueImageLightboxCarousel from 'vue-image-lightbox-carousel'export default {
components: {
VueImageLightboxCarousel,
},
}
`#### Browser global
`html
`Usage
You can simply view App.vue to see how to use vue-image-lightbox-carousel
How to use:
`html
`images has the structure:
`javascript
[
{
path: 'http://example.com/image.jpg',
caption: 'caption to display. receive', // Optional
}
]
`
Example
`html
ref="lightbox"
:show="showLightbox"
@close="showLightbox = false"
:images="images"
@change="changeImage"
>
``| name | type | default | description |
|---|---|---|---|
| images | Array | required | Image array to display |
| show | Boolean | true | Whether to show lightbox or not at the beginning |
| showThumbs | Boolean | true | Whether to show thumbnails or not |
| showCaption | Boolean | false | Whether to show caption or not |
| name | arguments | description |
|---|---|---|
| showImage | (index) | Show the image at index |
| name | arguments | description |
|---|---|---|
| close | () | Close lightbox |
| change | (index) | Image change at index |