eCollect / Vue Swipe Actions
Licence: mit
iOS style swipe actions
Stars: ✭ 154
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Vue Swipe Actions
React Swipeable Bottom Sheet
A swipeable material's bottom sheet implementation, using react-swipeable-views
Stars: ✭ 106 (-31.17%)
Mutual labels: swipe
React Native Web Swiper
Swiper-Slider for React-Native and React-Native-Web
Stars: ✭ 125 (-18.83%)
Mutual labels: swipe
Android Keyboard
Android Keyboard with 180+ dictionaries. Support swipe input (sliding input), Emoji keyboard, AI predictions, dictionaries downloading, and keyboard themes.
Stars: ✭ 108 (-29.87%)
Mutual labels: swipe
Swipemenulayout
🔥一个零耦合的侧滑菜单,支持RecyclerView、ListView、GridView等不同条目布局,支持菜单在左或在右,可选滑动阻塞,是否禁用等功能
Stars: ✭ 120 (-22.08%)
Mutual labels: swipe
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+1174.03%)
Mutual labels: swipe
Multiscroll.js
multiscroll plugin by Alvaro Trigo. Create scrolling split websites. http://alvarotrigo.com/multiScroll/
Stars: ✭ 1,537 (+898.05%)
Mutual labels: swipe
Androiduigesturerecognizer
AndroidGestureRecognizer is an Android implementation of the Apple's UIGestureRecognizer framework
Stars: ✭ 119 (-22.73%)
Mutual labels: swipe
Googlenewsstandanimation Android
Navigation pattern like in Google News Stand app with transitions
Stars: ✭ 130 (-15.58%)
Mutual labels: swipe
Sweetcurtain
A framework that provides CurtainController. CurtainController is a container view controller that implements a content-curtain interface. You can find a similar implementation in applications like Apple Maps, Find My, Stocks, etc. Someone calls it "Pull Up" or "Bottom Sheet".
Stars: ✭ 109 (-29.22%)
Mutual labels: swipe
Swipelayout
A library what allows you to execute a swipe for the android platform
Stars: ✭ 150 (-2.6%)
Mutual labels: swipe
React Native Swiper
The best Swiper component for React Native.
Stars: ✭ 9,797 (+6261.69%)
Mutual labels: swipe
Fullrecyclerview
This is a compilation of different kinds and actions in recyclerView
Stars: ✭ 127 (-17.53%)
Mutual labels: swipe
Android Video Listing Mvp
Android video listing with swipe view tabs based on mvp design pattern with complete functionalities like search and sort
Stars: ✭ 151 (-1.95%)
Mutual labels: swipe
Smartswipe
An android library to make swipe more easier and more powerful. Android各种侧滑,有这一个就够了
Stars: ✭ 1,911 (+1140.91%)
Mutual labels: swipe
vue-swipe-actions
iOS style swipe actions for Vue.js, Live Demo (Source)
Installation
npm install --save vue-swipe-actions
import { SwipeList, SwipeOut } from 'vue-swipe-actions';
export default {
components: {
SwipeOut,
SwipeList
}
};
Basic Usage
Import Styles
import 'vue-swipe-actions/dist/vue-swipe-actions.css';
SwipeList
SwipeList component is just a helper for listing multiple SwipeOuts.
Props
Prop | Data Type | Required | Default | Description |
---|---|---|---|---|
items |
Array | * | An array with your data | |
item-key |
String | id | Your key for :key when list is v-for-ed, if not found array index will used | |
disabled |
Boolean | false | if true items will be disabled, and text selection will be possible (on desktop). adds class swipeout--disabled
|
|
item-disabled |
Function | js () => false |
A function that receives the item as parameter and returns true case disabled or false if not | |
threshold |
Number | 45 | With that property you can fine tune when actions are considered open | |
passive-listeners |
Boolean | false | It defines if the touch events should be registered as passive or not | |
revealed |
Object | An object representing the revealed status of the items, key is the index and the value is either left or right , use it with the .sync modifier |
Events
Event | Payload | Description |
---|---|---|
swipeout:click |
item | Emitted on single click/tap on the item |
active |
Boolean | Emitted when the user is opening/closing the any of the actions |
Methods
Method | Params | Description |
---|---|---|
revealRight |
index (number) | Reveals right actions on given index |
revealLeft |
index (number) | Reveals left actions on given index |
closeActions |
index (number)? | Closes actions on given index, or all if no index given |
isRevealed |
index (number) | Returns the revealed status on a given index, either false for closed, or left or right
|
SwipeOut
SwipeOut is the main component, representing a single item with it's actions.
Props
Prop | Data Type | Required | Default | Description |
---|---|---|---|---|
disabled |
Boolean | false | if true items will be disabled, and text selection will be possible (on desktop). adds class swipeout--disabled
|
|
threshold |
Number | 45 | With that property you can fine tune when actions are considered open |
Events
Event | Payload | Description |
---|---|---|
active |
Boolean | Emitted when the user is opening/closing the any of the actions |
<swipe-list
ref="list"
class="card"
:disabled="!enabled"
:items="mockSwipeList"
item-key="id"
@swipeout:click="itemClick"
>
<template v-slot="{ item, index, revealLeft, revealRight, close }">
<!-- item is the corresponding object from the array -->
<!-- index is clearly the index -->
<!-- revealLeft is method which toggles the left side -->
<!-- revealRight is method which toggles the right side -->
<!-- close is method which closes an opened side -->
<div class="card-content">
<!-- style content how ever you like -->
<h2>{{ item.title }}</h2>
<p>{{ item.description }}</p>
<span>{{ index }}</span>
</div>
</template>
<!-- left swipe side template and v-slot:left="{ item }" is the item clearly -->
<!-- remove if you dont wanna have left swipe side -->
<template v-slot:left="{ item, close }">
<div class="swipeout-action red" title="remove" @click="remove(item)">
<!-- place icon here or what ever you want -->
<i class="fa fa-trash"></i>
</div>
<div class="swipeout-action purple" @click="close">
<!-- place icon here or what ever you want -->
<i class="fa fa-close"></i>
</div>
</template>
<!-- right swipe side template and v-slot:right"{ item }" is the item clearly -->
<!-- remove if you dont wanna have right swipe side -->
<template v-slot:right="{ item }">
<div class="swipeout-action blue">
<!-- place icon here or what ever you want -->
<i class="fa fa-heart"></i>
</div>
<div class="swipeout-action green">
<!-- place icon here or what ever you want -->
<i class="fa fa-heart"></i>
</div>
</template>
<template v-slot:empty>
<div>
<!-- change mockSwipeList to an empty array to see this slot in action -->
list is empty ( filtered or just empty )
</div>
</template>
</swipe-list>
export default {
components: {
SwipeOut,
SwipeList
},
data() {
return {
enabled: true,
mockSwipeList: [
{
id: 0,
title: "Some title",
description: "some description"
},
{
id: 1,
title: "Some title",
description: "some description"
},
{
id: 2,
title: "Some title",
description: "some description"
}
]
};
},
methods: {
revealFirstRight() {
this.$refs.list.revealRight(0);
},
revealFirstLeft() {
this.$refs.list.revealLeft(0);
},
closeFirst() {
this.$refs.list.closeActions(0);
},
closeAll() {
this.$refs.list.closeActions();
},
remove(item) {
this.mockSwipeList = this.mockSwipeList.filter(i => i !== item);
// console.log(e, 'remove');
},
itemClick(e) {
console.log(e, "item click");
},
fbClick(e) {
console.log(e, "First Button Click");
},
sbClick(e) {
console.log(e, "Second Button Click");
},
},
}
Author
© 2018-9 eCollect AG.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].