npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crisp-fix/vue-swipe-actions

v1.1.0

Published

iOS style swipe actions

Readme

vue-swipe-actions

iOS style swipe actions for Vue.js, Live Demo (Source)

Installation

npm install --save vue-swipe-actions
import { SwipeOut } from 'vue-swipe-actions';

export default {
  components: {
    SwipeOut
  }
};

Basic Usage

Import Styles

import 'vue-swipe-actions/dist/vue-swipe-actions.css';

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

| Prop | Payload | Description | | ----------------------- | --------------- | -| | swipeout:click | event | Emitted on single click/tap on the item | | swipeout:doubleclick | event | Emitted on double click/tap on the item | | active | Boolean | Emitted when the user is opening/closing the any of the actions |

<swipe-out v-for="(item, index) in mockSwipeList" :key="item.id" @swipeout:contentclick="contentClick" @swipeout:click="itemClick" @swipeout:doubleclick="itemDblClick">
  <!-- 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 slot="left" slot-scope="{ item, close }">
      <!-- remove <template slot="left" slot-scope="{ item }"> if you dont wanna have left swipe side  -->
      <!-- close is method which closes an opened side -->
      <div class="swipeout-action">
        <!-- place icon here or what ever you want -->
        <i class="fa fa-cloud"></i>
      </div>
      <div class="swipeout-action">
        <!-- place icon here or what ever you want -->
        <i class="fa fa-file"></i>
      </div>
  </template>
  <template slot="right" slot-scope="{ item, close }">
      <!-- remove <template slot="right" slot-scope="{ item }"> if you dont wanna have right swipe side  -->
      <!-- close is method which closes an opened side -->
      <div class="swipeout-action">
        <!-- place icon here or what ever you want -->
        <i class="fa fa-heart"></i>
      </div>
  </template>
  <div slot="empty">
    <!-- change mockSwipeList to an empty array to see this slot in action  -->
    list is empty ( filtered or just empty )
  </div>
</swipe-out>
components: {
  SwipeOut
},
data() {
  return {
    mockSwipeList: [
      {
        id: 0,
        key1: 'key1',
        key2: 'key2',
        key3: 'key3',
        key4: 'key4',
      },
      {
        id: 1,
        key1: 'key1',
        key2: 'key2',
        key3: 'key3',
        key4: 'key4',
      },
      {
        id: 2,
        key1: 'key1',
        key2: 'key2',
        key3: 'key3',
        key4: 'key4',
      },
    ],
  };
},
methods: {
  contentClick(e) {
    console.log(e, 'content click');
  },
  itemClick(e) {
    console.log(e, 'item click');
  },
  itemDblClick(e) {
    console.log(e, 'item double click');
  },
  fbClick(e) {
    console.log(e, 'First Button Click');
  },
  sbClick(e) {
    console.log(e, 'Second Button Click');
  },
},

Styling

The default styling is as minimal as possible, defining no visual styles but only functional ones. You can overwrite any of the styles if needed.

.swipeout {
  position: relative;
  overflow: hidden;
  user-select: none;
  display: flex;
}
.swipeout.swipeout--disabled {
  user-select: auto;
}
.swipeout .swipeout-left,
.swipeout .swipeout-right {
  position: absolute;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  z-index: 1;
}
.swipeout.swipeout--transitioning .swipeout-action,
.swipeout.swipeout--transitioning .swipeout-content {
  transition: transform 0.3s;
}
.swipeout .swipeout-content {
  width: 100%;
}
.swipeout .swipeout-action,
.swipeout .swipeout-content {
  will-change: transform;
}
.swipeout .swipeout-left {
  left: 0;
  transform: translateX(-100%);
}
.swipeout .swipeout-right {
  right: 0;
  transform: translateX(100%);
}
.swipeout-list-item {
  outline: none;
}

Author

© 2018 eCollect AG.