Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davidgaroro/vuetify-swipeout

๐Ÿ‘† A swipe out example built with Vue 2 + Vuetify + Swiper.
https://github.com/davidgaroro/vuetify-swipeout

javascript material material-design mobile pwa slider swipe swiper touch touch-events vue vue-cli vue2 vuejs vuejs2 vuetify

Last synced: 6 days ago
JSON representation

๐Ÿ‘† A swipe out example built with Vue 2 + Vuetify + Swiper.

Awesome Lists containing this project

README

        

# vuetify-swipeout
This project is a swipe out example built with [Vue], [Vuetify] and [Swiper].

[Vue.js]: https://vuejs.org
[Swiper]: http://idangero.us/swiper/
[Vuetify]: https://vuetifyjs.com





Live Demo

## Features
- Vue CLI 3 + Webpack + vue-loader for single file Vue components
- Hot-reload in development
- Lint-on-save with [ESLint (Standard)](https://github.com/standard/eslint-config-standard)
- Stylus CSS preprocessor
- Vuetify a-la-carte (reduce project's size in production)
- Progressive Web App
- App manifest
- Service worker
- Workbox options - [Cache Google Fonts]
- 100/100 Lighthouse score

[Cache Google Fonts]: https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts

## Built With
### Dependencies
| Name| Description | |
|--|--|:--:|
|[swiper]|๏ธMost Modern Mobile Touch Slider|๐Ÿ‘†
|[vue]|Progressive JavaScript Framework|๐Ÿ––
|[vue-cli-3]|๏ธStandard Tooling for Vue.js Development|๐Ÿ› ๏ธ
|[vuetify]|๏ธMaterial Component Framework for Vue.js|๐Ÿ“š

[swiper]: http://idangero.us/swiper
[vue]: https://vuejs.org
[vue-cli-3]: https://cli.vuejs.org
[vuetify]: https://vuetifyjs.com

### Development Dependencies
| Name| Description | |
|--|--|:--:|
|[stylus-loader]|CSS preprocessor for webpack|๐ŸŽจ
|[vue/cli-plugin-babel]|Compiler for next generation JavaScript|๐Ÿ 
|[vue/cli-plugin-eslint]|Pluggable JavaScript linter|โœ๏ธ
|[vue/cli-plugin-pwa]|JavaScript Library for adding support to PWA|๐Ÿ“ฑ

[stylus-loader]: https://github.com/shama/stylus-loader
[vue/cli-plugin-babel]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel
[vue/cli-plugin-eslint]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint
[vue/cli-plugin-pwa]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa

## How To Use Swiper with Vuetify

> For information on how to use Swiper, visit the [official documentation]

[official documentation]: http://idangero.us/swiper/get-started/

### Install Swiper
```
npm install swiper --save
```

### Add v-list component
``` vue

...






...

import CustomComponent from '@/components/CustomComponent.vue'
export default {
components: {
'custom-component': CustomComponent
},
methods: {
transitionEnd () {
// Callback from SwipeoutItem after transition
...
}
}
}

```

### Import and configure Swiper in the custom component
``` vue








import 'swiper/dist/css/swiper.min.css'
import { Swiper } from 'swiper/dist/js/swiper.esm.js'

export default {
props: ['id'],
mounted () {
const self = this
const el = '#' + this.id

// Initialize Swiper
const swiper = new Swiper(el, {
initialSlide: 1,
resistanceRatio: 0,
speed: 150
})

// Event will be fired after transition
swiper.on('transitionEnd', function () {
if (this.activeIndex === 0) {
self.$emit('transitionEnd')
// Destroy slider instance and detach all events listeners
this.destroy()
}
})
}
}

```

## Project Installation & Setup
### Clone repository
```
git clone https://github.com/davidgaroro/vuetify-swipeout.git
cd vuetify-swipeout
```

### Install dependencies
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```
## Donation
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?hosted_button_id=T7CVYXY994KHJ)
## License
[MIT](./LICENSE) ยฉ davidgaroro