A set of vue mixins to turn any list into an animated, touch-friendly, sortable list ✌️

Overview

Vue Slicksort 🖖

Slicksort logo

A set of component mixins to turn any list into an animated, touch-friendly, sortable list. Based on react-sortable-hoc by [@clauderic]

npm version npm downloads license gzip size

Examples available here: https://jexordexan.github.io/vue-slicksort/

中文文档

Features

  • v-model Compatible – Make any array editable with the v-model standard
  • Mixin Components – Integrates with your existing components
  • Standalone Components – Easy to use components for slick lists
  • Drag handle, auto-scrolling, locked axis, events, and more!
  • Suuuper smooth animations – Chasing the 60FPS dream 🌈
  • Horizontal lists, vertical lists, or a grid
  • Touch support 👌
  • Oh yeah, and it's DEPENDENCY FREE! 👌

Installation

Using npm:

  $ npm install vue-slicksort --save

Using yarn:

  $ yarn add vue-slicksort

Using a CDN:

<script src="https://unpkg.com/[email protected]/dist/vue-slicksort.min.js"></script>

Then, using a module bundler that supports either CommonJS or ES2015 modules, such as webpack:

// Using an ES6 transpiler like Babel
import { ContainerMixin, ElementMixin } from 'vue-slicksort';

// Not using an ES6 transpiler
var slicksort = require('vue-slicksort');
var ContainerMixin = slicksort.ContainerMixin;
var ElementMixin = slicksort.ElementMixin;

If you are loading the package via <script> tag:

<script>
  var { ContainerMixin, ElementMixin, HandleDirective } = window.VueSlicksort;
</script>

Usage

Basic Example

import Vue from 'vue';
import { ContainerMixin, ElementMixin } from 'vue-slicksort';

const SortableList = {
  mixins: [ContainerMixin],
  template: `
    <ul class="list">
      <slot />
    </ul>
  `,
};

const SortableItem = {
  mixins: [ElementMixin],
  props: ['item'],
  template: `
    <li class="list-item">{{item}}</li>
  `,
};

const ExampleVue = {
  name: 'Example',
  template: `
    <div class="root">
      <SortableList lockAxis="y" v-model="items">
        <SortableItem v-for="(item, index) in items" :index="index" :key="index" :item="item"/>
      </SortableList>
    </div>
  `,
  components: {
    SortableItem,
    SortableList,
  },
  data() {
    return {
      items: ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5', 'Item 6', 'Item 7', 'Item 8'],
    };
  },
};

const app = new Vue({
  el: '#root',
  render: (h) => h(ExampleVue),
});

That's it! Vue Slicksort does not come with any styles by default, since it's meant to enhance your existing components.

Slicksort components

There are two pre-built components that implement the two mixins. Use them like this:

import { SlickList, SlickItem } from 'vue-slicksort';

const ExampleVue = {
  name: 'Example',
  template: `
    <div class="root">
      <SlickList lockAxis="y" v-model="items" tag="ul">
        <SlickItem v-for="(item, index) in items" :index="index" :key="index" tag="li">
          {{ item }}
        </SlickItem>
      </SlickList>
    </div>
  `,
  components: {
    SlickItem,
    SlickList,
  },
  data() {
    return {
      items: ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5', 'Item 6', 'Item 7', 'Item 8'],
    };
  },
};

Why should I use this?

There are already a number of great Drag & Drop libraries out there (for instance, vuedraggable is fantastic). If those libraries fit your needs, you should definitely give them a try first. However, most of those libraries rely on the HTML5 Drag & Drop API, which has some severe limitations. For instance, things rapidly become tricky if you need to support touch devices, if you need to lock dragging to an axis, or want to animate the nodes as they're being sorted. Vue Slicksort aims to provide a simple set of component mixins to fill those gaps. If you're looking for a dead-simple, mobile-friendly way to add sortable functionality to your lists, then you're in the right place.

Customization and props

You apply options as individual props on whatever component is using the ContainerMixin. The component also emits several events during a sorting operation. Here's an example of a customized component:

<SortableContainer
  :value="items"
  :transitionDuration="250"
  :lockAxis="'y'"
  :useDragHandle="true"
  @sort-start="onSortStart($event)"
>
  <!-- SortableElement stuff goes here -->
</SortableContainer>

ContainerMixin

Props

value (required)

type: Array

The value can be inherited from v-model but has to be set to the same list that is rendered with v-for inside the Container

axis

type: String

default: y

Items can be sorted horizontally, vertically or in a grid. Possible values: x, y or xy

lockAxis

type: String

If you'd like, you can lock movement to an axis while sorting. This is not something that is possible with HTML5 Drag & Drop

helperClass

type: String

You can provide a class you'd like to add to the sortable helper to add some styles to it

appendTo

type: String

default: body

You can provide a querySelector string you'd like to add to the sorting element to add parent dom

transitionDuration

type: Number

default: 300

The duration of the transition when elements shift positions. Set this to 0 if you'd like to disable transitions

draggedSettlingDuration

type: Number

default: null

Override the settling duration for the drag helper. If not set, transitionDuration will be used.

pressDelay

type: Number

default: 0

If you'd like elements to only become sortable after being pressed for a certain time, change this property. A good sensible default value for mobile is 200. Cannot be used in conjunction with the distance prop.

pressThreshold

type: Number

default: 5

Number of pixels of movement to tolerate before ignoring a press event.

distance

type: Number

default: 0

If you'd like elements to only become sortable after being dragged a certain number of pixels. Cannot be used in conjunction with the pressDelay prop.

useDragHandle

type: Boolean

default: false

If you're using the HandleDirective, set this to true

useWindowAsScrollContainer

type: Boolean

default: false

If you want, you can set the window as the scrolling container

hideSortableGhost

type: Boolean

default: true

Whether to auto-hide the ghost element. By default, as a convenience, Vue Slicksort List will automatically hide the element that is currently being sorted. Set this to false if you would like to apply your own styling.

lockToContainerEdges

type: Boolean

default: false

You can lock movement of the sortable element to it's parent Container

lockOffset

type: OffsetValue or [ OffsetValue, OffsetValue ]*

default: "50%"

When lockToContainerEdges is set to true, this controls the offset distance between the sortable helper and the top/bottom edges of it's parent Container. Percentage values are relative to the height of the item currently being sorted. If you wish to specify different behaviours for locking to the top of the container vs the bottom, you may also pass in an array (For example: ["0%", "100%"]).

* OffsetValue can either be a finite Number or a String made up of a number and a unit (px or %). Examples: 10 (which is the same as "10px"), "50%"

shouldCancelStart

type: Function

default: Function

This function is invoked before sorting begins, and can be used to programatically cancel sorting before it begins. By default, it will cancel sorting if the event target is either an input, textarea, select or option.

getHelperDimensions

type: Function

default: Function

Optional function({node, index, collection}) that should return the computed dimensions of the SortableHelper. See default implementation for more details

Events

Events are emitted from the Container element, and can be bound to using v-bind or @ directives

@sort-start

emits: { event: MouseEvent, node: HTMLElement, index: number, collection: string }

Fired when sorting begins.

@sort-move

emits: { event }

Fired when the mouse is moved during sorting.

@sort-end

emits: { event, newIndex, oldIndex, collection }

Fired when sorting has ended.

@input

emits: Array

Fired after sorting has ended with the newly sorted list.


ElementMixin

Props

index (required)

type: Number

This is the element's sortableIndex within it's collection. This prop is required.

collection

type: Number or String

default: 0

The collection the element is part of. This is useful if you have multiple groups of sortable elements within the same Container. Example

disabled

type: Boolean

default: false

Whether the element should be sortable or not

HandleDirective

The v-handle directive is used inside the draggable element.

The Container must have the :useDragHandle prop set to true for the handle to work as expected.

Here is an example for a simple element with a handle:

<template>
  <li class="list-item">
    <span v-handle class="handle"></span>
    {{item.value}}
  </li>
</template>

<script>
  import { ElementMixin, HandleDirective } from 'vue-slicksort';

  export default {
    mixins: [ElementMixin],
    directives: { handle: HandleDirective },
  };
</script>

FAQ

Upgrade from v0.x.x

The event names have all changed from camelCase to dash-case to accommodate for inline HTML templates.

Grid support?

Need to sort items in a grid? We've got you covered! Just set the axis prop to xy. Grid support is currently limited to a setup where all the cells in the grid have the same width and height, though we're working hard to get variable width support in the near future.

Item disappearing when sorting / CSS issues

Upon sorting, vue-slicksort creates a clone of the element you are sorting (the sortable-helper) and appends it to the end of the appendTo tag. The original element will still be in-place to preserve its position in the DOM until the end of the drag (with inline-styling to make it invisible). If the sortable-helper gets messed up from a CSS standpoint, consider that maybe your selectors to the draggable item are dependent on a parent element which isn't present anymore (again, since the sortable-helper is at the end of the appendTo prop). This can also be a z-index issue, for example, when using vue-slicksort within a Bootstrap modal, you'll need to increase the z-index of the SortableHelper so it is displayed on top of the modal.

Click events being swallowed

By default, vue-slicksort is triggered immediately on mousedown. If you'd like to prevent this behaviour, there are a number of strategies readily available. You can use the distance prop to set a minimum distance (in pixels) to be dragged before sorting is enabled. You can also use the pressDelay prop to add a delay before sorting is enabled. Alternatively, you can also use the HandleDirective.

Scoped styles

If you are using scoped styles on the sortable list, you can use appendTo prop.

Dependencies

Slicksort has no dependencies. vue is the only peerDependency

Reporting Issues

If believe you've found an issue, please report it along with any relevant details to reproduce it. The easiest way to do so is to fork this jsfiddle.

Asking for help

Please file an issue for personal support requests. Tag them with question.

Contributions

Yes please! Feature requests / pull requests are welcome.

Thanks

This library is heavily based on react-sortable-hoc by Claudéric Demers (@clauderic). A very simple and low overhead implementation of drag and drop that looks and performs great!

Issues
  • Standalone Slicksort component

    Standalone Slicksort component

    This could behave similarly to the <draggable> component in vuedraggable Where there is one component with a slot for it's children, which have been iterated using v-for.

    0.2.x enhancement help wanted 
    opened by Jexordexan 11
  • Define sortable container explicitly

    Define sortable container explicitly

    Hi, I have a problem while sorting. Dragged element disappears from view. It is inserted just before closing body tag. Is there a way to define sortable container?

    question 
    opened by ghost 10
  • Can't seem to use other components as items

    Can't seem to use other components as items

    I want to create a sortable list of component elements. I can get them to render fine, but after I drag, the elements repopulate with their original sorted value. It appears the v-model binding is not being updated down or something.

    opened by mattbishop 10
  • Uncaught ReferenceError: regeneratorRuntime is not defined

    Uncaught ReferenceError: regeneratorRuntime is not defined

    The error is thrown after I import vue-slicksort

    import { SlickList, SlickItem } from 'vue-slicksort'
    
    opened by nodegin 9
  • Vue 3 support

    Vue 3 support

    Any plans to upgrade this great plugin to support Vue 3?

    opened by mirkojov 9
  • Clear Examples Required

    Clear Examples Required

    The example is not descriptive. Others a bit complicated. Where do you write this? useDragHandle="true" Can you provide separate examples?

    documentation help wanted 
    opened by ghost 7
  • Dragging between lists

    Dragging between lists

    This is a fantastic project and the ability to drag in a grid is a feature I've not found anywhere else. However, I was wondering if there was a way you could drag and drop between two lists?

    I have two arrays and I want to be able to move items between them; is this possible?

    Thanks!

    opened by hako-studio 6
  • Source data does not seem to be updated when @sort-end fires

    Source data does not seem to be updated when @sort-end fires

    Hey Jordan,

    A bit confused by this one...

    I'm using v-model as suggested in the docs to update the sortable parent. I'm also using @sort-end to report updates so I can save the source data.

    However, the data appears to always be one drag behind!

        onSortEnd ({ newIndex, oldIndex }) {
          console.log(this.items.map(item => item.title)) // always one drag behind!
          // can't save items :(
        },
    

    Whilst investigating the v-model setup, I replaced it with a simple :value="items" prop and instead did my own ordering in the sort end handler:

        onSortEnd ({ newIndex, oldIndex }) {
          this.items.splice(newIndex, 0, ...this.items.splice(oldIndex, 1))
          console.log(this.items.map(item => item.title)) // looking good
          // save items :)
        },
    

    The manual method works for me, but any idea what is going on?

    Is this expected behaviour?

    opened by davestewart 6
  • Add `tag` props to SlickList and SlickItem

    Add `tag` props to SlickList and SlickItem

    Great little lib!

    I needed to add DnD to a bulleted list without getting into the weeds. Your built-in components seemed like just the ticket, but they add invalid markup if you just need a list.

    This PR allows the user to change the tag type, in the same way that Vue Router's <router-link> does:

              <SlickList
                v-model="articles"
                lock-axis="y"
                tag="ul"
              >
                <SlickItem
                  v-for="(article, index) in articles"
                  :key="article.acc"
                  :index="index"
                  tag="li"
                >
                  {{ article.title }}
                </SlickItem>
              </SlickList>
            </div>
    
    <ul>
        <li>
            Luxury Brands Follow Chinese Shoppers Back Home; For the first time, designer brands opened more shops in
            markets like China and Japan than in Europe
        </li>
        <li>
            Puig Shakes Up Business Structure, Aims for 3 Billion Euros in 2023 Sales
        </li>
        <li>
            James Harden's Stepback From the Rockets; The NBA star wants out with two years left on his contract. It's the
            latest saga pitting a disgruntled player against his own team.
        </li>
    </ul>
    

    Cheers 👍

    opened by davestewart 6
  • Update fiddle link

    Update fiddle link

    fiddle link is broken.

    bug documentation 
    opened by ghost 6
  • Bump dns-packet from 1.3.1 to 1.3.4

    Bump dns-packet from 1.3.1 to 1.3.4

    Bumps dns-packet from 1.3.1 to 1.3.4.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Keyboard navigation

    Keyboard navigation

    We should implement an intuitive keyboard control for the sorting.

    The first list item should be the only focusable element. By pressing up, down, left, right, you control the current selection. By pressing enter or space you "grab" the current item. By pressing up, down, left, right, you "move" the item. By pressing enter you "drop" the item, or esc to cancel. By pressing tab you exit the container.

    https://medium.com/salesforce-ux/4-major-patterns-for-accessible-drag-and-drop-1d43f64ebf09

    accessibility 
    opened by Jexordexan 0
  • Bump hosted-git-info from 2.5.0 to 2.8.9

    Bump hosted-git-info from 2.5.0 to 2.8.9

    Bumps hosted-git-info from 2.5.0 to 2.8.9.

    Changelog

    Sourced from hosted-git-info's changelog.

    2.8.9 (2021-04-07)

    Bug Fixes

    2.8.8 (2020-02-29)

    Bug Fixes

    • #61 & #65 addressing issues w/ url.URL implmentation which regressed node 6 support (5038b18), closes #66

    2.8.7 (2020-02-26)

    Bug Fixes

    • Do not attempt to use url.URL when unavailable (2d0bb66), closes #61 #62
    • Do not pass scp-style URLs to the WhatWG url.URL (f2cdfcf), closes #60

    2.8.6 (2020-02-25)

    2.8.5 (2019-10-07)

    Bug Fixes

    • updated pathmatch for gitlab (e8325b5), closes #51
    • updated pathmatch for gitlab (ffe056f)

    2.8.4 (2019-08-12)

    ... (truncated)

    Commits
    • 8d4b369 chore(release): 2.8.9
    • 29adfe5 fix: backport regex fix from #76
    • afeaefd chore(release): 2.8.8
    • 5038b18 fix: #61 & #65 addressing issues w/ url.URL implmentation which regressed nod...
    • 7440afa chore(release): 2.8.7
    • 2d0bb66 fix: Do not attempt to use url.URL when unavailable
    • f2cdfcf fix: Do not pass scp-style URLs to the WhatWG url.URL
    • e1b83df chore(release): 2.8.6
    • ff259a6 Ensure passwords in hosted Git URLs are correctly escaped
    • 624fd6f chore(release): 2.8.5
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by nlf, a new releaser for hosted-git-info since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump lodash from 4.17.20 to 4.17.21

    Bump lodash from 4.17.20 to 4.17.21

    Bumps lodash from 4.17.20 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump ua-parser-js from 0.7.17 to 0.7.28

    Bump ua-parser-js from 0.7.17 to 0.7.28

    Bumps ua-parser-js from 0.7.17 to 0.7.28.

    Commits
    • 1d3c98a Revert breaking fix #279 and release as 0.7.28
    • 535f11b Delete redundant code
    • 642c039 Fix #492 LG TV WebOS detection
    • 3edacdd Merge branch 'master' into develop
    • acc0b91 Update contributor list
    • f726dcd Merge branch 'master' into develop
    • 383ca58 More test for tablet devices
    • 7c8aa43 Minor rearrangement
    • 09aa910 Add new device & browser: Tesla
    • 557cc21 More test for latest phones with unique form factor (fold/flip/qwerty/swivel)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Wrong positioning inside a translated container

    Wrong positioning inside a translated container

    Demo: https://jsfiddle.net/aj4wun59

    When a sortable element is appended to an element inside a translated container (for example, Bootstrap popover), the library calculates its position relative to a viewport instead of its parent.

    bug 
    opened by h0rn3z0r 0
  • Feature Request: Cancel dragging

    Feature Request: Cancel dragging

    Use case: User starts to drag an item in a long list, but then changes their mind. Hitting Escape should cancel the drag operation. Currently it doesn't seem like there's a way to stop the @sort-end event from firing once a drag has started, and no way to capture keystrokes during the drag, unless I missed something?

    If a @sort-keystroke event could be created, other possibilities (like holding shift to create copies, etc.) might open up too.

    enhancement 
    opened by dsl101 0
  • Touch event trigger will conflict with component

    Touch event trigger will conflict with component

    Using the touch event in a custom element will cause the element drag effect to be invalid,How to solve this problem??? <div @touchstart="gotouchstart" @touchmove="gotouchmove" @touchend="gotouchend(deviceItem)" >

    opened by 18825607789 1
  • Sorting within a fixed height container

    Sorting within a fixed height container

    The sorting does not seem to be working when the items are in a fixed height container that scroll all the items.

    See this fiddle: https://jsfiddle.net/ns5jg8L9/

    If you try to drag the last item in the list to the top it won't scroll automatically and even if you use the mouse wheel to scroll while dragging it, dropping it on the top won't trigger a drop.

    I guess this has something to do with the contentWindow prop that is by default set to the window container?

    enhancement good first issue 
    opened by ObaidUrRehman 1
  • Add Multi Select Functionality

    Add Multi Select Functionality

    • Replace Manager."active" term with "Touched"
    • Introduce SortableInfo.selected
    • Allow MultiSelection Drag and Drop via a new Prop named "selectionMode"
    • Do not start drag and drop until move moves (For MultiSelection Mode)
    opened by PhilipNameHere 0
Owner
A Jordan Simonds
I build apps and help make them look pretty. Doesn't hurt to make them fast either!
A Jordan Simonds
Vue drag-and-drop component based on Sortable.js

Vue.Draggable Vue component (Vue.js 2.0) or directive (Vue.js 1.0) allowing drag-and-drop and synchronization with view model array. Based on and offe

SortableJS 15.2k Jun 13, 2021
Vue wrapper components for smooth-dnd

Vue Smooth DnD A fast and lightweight drag&drop, sortable library for Vue.js with many configuration options covering many d&d scenarios. This library

Kutlu Sahin 1.2k Jun 10, 2021
Vue2 Component for draggable and resizable elements.

VueDraggableResizable 2 Vue2 Component for draggable and resizable elements. If you are looking for the version 1 of the component, it is available on

Maurizio 2.2k Jun 10, 2021
Drag And Drop functionality for Vue.js - written in Vue.js

vue-dnd-zone is a vue.js plugin for drag and drop functionality. It is not a wrapper for an external js library, but a set of vue components managing the drag and drop event and data model state

Yair Levy 75 Jun 6, 2021
🦄 Vue components for modifying lists with the HTML5 drag & drop API.

Vue components for modifying lists with the HTML5 drag & drop API. ?? Warning ?? Don't set index to the :key, it will cause dragging confusion. <vddl-

Hejx 407 May 7, 2021
A sortable list directive with Vue

Awe-dnd Makes your elements draggable in Vue. See Demo: http://hilongjw.github.io/vue-dragging/ Some of goals of this project worth noting include: su

Awe 709 Jun 5, 2021
A touch slider for vue.js, support sliding in any direction to switch cards, compatible with PC and mobile.

vue-card-swipe A touch slider for vue.js, support sliding in any direction to switch cards, compatible with PC and mobile. Online Demo Install $ npm i

Sky.Sun 孙正华 21 Apr 8, 2021
Vue Component for resize and drag elements

Vue-drag-resize Vue Component for draggable and resizable elements. Table of Contents Features Install and basic usage Props Events Contributing Licen

null 1.1k Jun 13, 2021
A lightweight Vue wrapper that abstracts away the wonkier parts of the Drag and Drop Browser API

❗ Version 1.0.0 is out! This finally includes support for IE/Edge. Note that this required skipping the native transferData event property entirely in

J. Cameron McDonald 455 Jun 1, 2021
Vue2 component, that allows you to drag object wherever you want

vue-drag-it-dude Vue2 component, that allows you to drag object wherever you want What this can do Drag and drop DOM elements inside parent (or docume

Max Novikov 70 Mar 5, 2021
:ok_hand: Drag and drop so simple it hurts http://astray-git.github.io/vue-dragula

vue2-dragula ?? Drag and drop so simple it hurts Vue wrapper for dragula drag'n drop library, based on vue-dragula by @Astray-git. This library has be

Kristian Mandrup 209 May 7, 2021
Have your own Tinder and TanTan.

Introduction VueTinder is a Vue component that helps you quickly implement the main features of similar apps like Tinder, TanTan, etc. Links ?? Docume

单泠浩 108 Jun 4, 2021
A simple kanban board where the items can be dragged and dropped from the list. This is a hybrid implementation of vue-smooth-dnd.

A simple kanban board where the items can be dragged and dropped from the list. This is a hybrid implementation of vue-smooth-dnd. Demo Usage Installa

Sujil Maharjan 100 May 27, 2021
Vue.js wrapper for Swing

VueSwing A Vue.js wrapper for Swing. Swing is a swipeable cards interface. The swipe-left/swipe-right for yes/no input. As seen in apps like Jelly and

Goh Wei Wen 195 May 21, 2021