Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malayvuong/vimage
v-image is a plugin for Vue.js that allows you to show images in full-screen gallery by adding only one directive to the tag
https://github.com/malayvuong/vimage
gallery image lightbox v-image vue
Last synced: 22 days ago
JSON representation
v-image is a plugin for Vue.js that allows you to show images in full-screen gallery by adding only one directive to the tag
- Host: GitHub
- URL: https://github.com/malayvuong/vimage
- Owner: malayvuong
- License: mit
- Created: 2020-08-31T08:41:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T16:20:15.000Z (over 4 years ago)
- Last Synced: 2024-12-09T20:19:46.330Z (about 2 months ago)
- Topics: gallery, image, lightbox, v-image, vue
- Language: Vue
- Homepage: https://www.npmjs.com/package/@ispa.io/vimage
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
vImage (Vue Image lightbox viewer)
`v-image` is a plugin for Vue.js that allows you to show images in full-screen gallery by adding only one directive to the tag. This project created and used for iSPA CMS, so if you used this package, please noted that we may not check your issue or request.
## Table of contents
- [Getting started](#getting-started)
- [Props](#props)
- [Milestone](#milestone)
- [Versioning](#versioning)
- [License](#license)## Milestone
- [ ] srcSet attributes support
- [ ] Custom download buttons group for srcSet
- [ ] Custom Icons (Download, Arrows, Close)
- [ ] Video support
- [ ] Picture tag support
- [ ] Gallery Auto play
- [ ] Integrate with el-image (Element UI)
## Getting started### Install
```shell
npm i @ispa.io/vimage // npm
```### Usage
```js
import Vue from 'vue';
import vImage from '@ispa.io/vimage';Vue.use(vImage);
```### Optional configurations
In this snippet all settings has its default value. Don't specify them unless you want to change default behavior.
```javascript
const vImageConfig = {
// Global title
'title': null,
// Show download button
'download': false,
// Show thumbnails
'thumbnails': false,
// on Event to show image
'openOn': 'click',
}
Vue.use(vImage, vImageConfig);
```
### Example
**Grouping images list**```html
```
OR
```html
```
OR
```html
```**Only one image**
```html
```
OR
```html
```### Options
| Option | Description | Default value | Data type |
| :----: | :---------: | :-----------: | :-------: |
| group | Group name | null | String |
| data-src | Image source that will be displayed in gallery | data-src attribute | String |
| src | Image thumbnails | src attribute | String |
| title | Caption that will be displayed | empty String or value of the `alt` attribute | String |
| openOn | Event listener to open gallery will be applied to tagName. Available options are all native JS events. | `click`/`dblclick`/`mouseover`... | String |
| data-download | Download button show | `false` | Boolean |
| data-thumbnails | Small thumbnails show (this thumb will be show by the `src` attribute) | `false` | Boolean |This plugins has more options and will be available at next versions.
## Versioning
Maintained under the [Semantic Versioning guidelines](https://semver.org/).
## License
[MIT](https://opensource.org/licenses/MIT) © [Malayvuong](https://malayvuong.com/)
## Invite me a cup of coffee
If you like this project and want to contribute us, then you can send us a cup of coffee by this ways below:| PAYPAL.ME | MOMO App (Vietnam) |
|:--------------------:|:------------------:|
| | |[⬆ back to top](#table-of-contents)