Gathering detailed insights and metrics for vue-shopify-draggable
Gathering detailed insights and metrics for vue-shopify-draggable
Gathering detailed insights and metrics for vue-shopify-draggable
Gathering detailed insights and metrics for vue-shopify-draggable
npm install vue-shopify-draggable
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
16 Stars
25 Commits
7 Forks
1 Watchers
4 Branches
2 Contributors
Updated on May 24, 2024
Latest Version
0.0.3
Package Id
vue-shopify-draggable@0.0.3
Unpacked Size
86.47 kB
Size
11.90 kB
File Count
27
NPM Version
6.14.15
Node Version
12.22.7
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
English | 简体中文
Vue component of Shopify draggable.
npm:
1npm install vue-shopify-draggable 2# peer dependencies 3npm install vue @shopify/draggable
CDN:
1<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script>
ES6:
1import Vue from 'vue'; 2import VueShopifyDraggable from 'vue-shopify-draggable'; 3Vue.use(VueShopifyDraggable);
CDN:
1<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 2<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script> 3<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 4<script> 5 Vue.use(VueShopifyDraggable); 6</script>
Vue3:
1<div id="vue-shopify-draggable-app"> 2 <vue-sortable :options="options" @sortable:sorted="sorted"> 3 <vue-draggable-container tag="ul"> 4 <li class="item">sortable-item1</li> 5 <li class="item">sortable-item2</li> 6 </vue-draggable-container> 7 <hr /> 8 <vue-draggable-container tag="ul"> 9 <li class="item">sortable-item3</li> 10 </vue-draggable-container> 11 </vue-sortable> 12</div> 13 14<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 15<script src="//cdn.jsdelivr.net/npm/vue@3.2.21/dist/vue.global.min.js"></script> 16<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 17 18<script> 19 const VueShopifyDraggableApp = { 20 methods: { 21 sorted: function (e) { 22 console.log(e); 23 }, 24 }, 25 data() { 26 return { 27 options: { 28 draggable: '.item', 29 sortAnimation: { 30 duration: 200, 31 easingFunction: 'ease-in-out', 32 }, 33 plugins: [Draggable.Plugins.SortAnimation], 34 }, 35 }; 36 }, 37 }; 38 39 const app = Vue.createApp(VueShopifyDraggableApp); 40 41 app.use(VueShopifyDraggable); 42 43 app.mount('#vue-shopify-draggable-app'); 44</script>
Register all components:
1Vue.use(VueShopifyDraggable);
Separately register components:
1Vue.use(VueShopifyDraggable.DraggableContainer);
2Vue.use(VueShopifyDraggable.Sortable);
3Vue.use(VueShopifyDraggable.Swappable);
4Vue.use(VueShopifyDraggable.Droppable);
5Vue.use(VueShopifyDraggable.Draggable);
6
7// or
8
9Vue.component('CustomName', VueShopifyDraggable.Swappable);
vue-sortable
vue-sortable
support set options and listen events of Sortable.
1<div id="VueEl"></div> 2 3<script type="text/template" id="VueTemplate"> 4 <vue-sortable :options="options" @sortable:sorted="sorted"> 5 <vue-draggable-container tag="ul"> 6 <li class="item">sortable-item1</li> 7 <li class="item">sortable-item2</li> 8 </vue-draggable-container> 9 <hr /> 10 <vue-draggable-container tag="ul"> 11 <li class="item">sortable-item3</li> 12 </vue-draggable-container> 13 </vue-sortable> 14</script> 15 16<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 17<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script> 18<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 19 20<script> 21 Vue.use(VueShopifyDraggable); 22 new Vue({ 23 el: VueEl, 24 template: VueTemplate.innerHTML, 25 data: function () { 26 return { 27 options: { 28 draggable: '.item', 29 sortAnimation: { 30 duration: 200, 31 easingFunction: 'ease-in-out', 32 }, 33 plugins: [Draggable.Plugins.SortAnimation], 34 }, 35 }; 36 }, 37 methods: { 38 sorted: function (e) { 39 console.log(e); 40 }, 41 }, 42 }); 43</script>
vue-swappable
vue-swappable
support set options and listen events of Swappable.
1<div id="VueEl"></div> 2 3<script type="text/template" id="VueTemplate"> 4 <vue-swappable :options="options" @swappable:swapped="swapped"> 5 <vue-draggable-container tag="ul"> 6 <li class="item">draggable-item1</li> 7 <li class="item">draggable-item2</li> 8 </vue-draggable-container> 9 <hr /> 10 <vue-draggable-container tag="ul"> 11 <li class="item">draggable-item3</li> 12 </vue-draggable-container> 13 </vue-swappable> 14</script> 15 16<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 17<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script> 18<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 19 20<script> 21 Vue.use(VueShopifyDraggable); 22 new Vue({ 23 el: VueEl, 24 template: VueTemplate.innerHTML, 25 data: function () { 26 return { 27 options: { 28 draggable: '.item', 29 }, 30 }; 31 }, 32 methods: { 33 swapped: function (e) { 34 console.log(e); 35 }, 36 }, 37 }); 38</script>
vue-droppable
vue-droppable
support set options and listen events of Droppable.
1<style> 2 .dropzone { 3 height: 30px; 4 border: 2px solid aqua; 5 } 6</style> 7 8<div id="VueEl"></div> 9 10<script type="text/template" id="VueTemplate"> 11 <vue-droppable :options="options" @droppable:start="start" @droppable:dropped="dropped"> 12 <vue-draggable-container> 13 <div class="dropzone draggable-dropzone--occupied"><div class="item">droppable-item1</div></div> 14 <div class="dropzone draggable-dropzone--occupied"><div class="item">droppable-item2</div></div> 15 <div class="dropzone draggable-dropzone--occupied"><div class="item">droppable-item3</div></div> 16 </vue-draggable-container> 17 <hr /> 18 <vue-draggable-container> 19 <div class="dropzone"></div> 20 </vue-draggable-container> 21 </vue-droppable> 22</script> 23 24<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 25<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script> 26<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 27 28<script> 29 Vue.use(VueShopifyDraggable); 30 new Vue({ 31 el: VueEl, 32 template: VueTemplate.innerHTML, 33 data: function () { 34 return { 35 options: { 36 draggable: '.item', 37 dropzone: '.dropzone', 38 }, 39 }; 40 }, 41 methods: { 42 dropped: function (e) { 43 console.log(e); 44 }, 45 start: function (e) { 46 console.log(e); 47 }, 48 }, 49 }); 50</script>
vue-draggable
vue-draggable
support set options and listen events of Draggable.
1<div id="VueEl"></div> 2 3<script type="text/template" id="VueTemplate"> 4 <vue-draggable :options="options" @drag:start="dragStart"> 5 <vue-draggable-container tag="ul"> 6 <li class="item">draggable-item1</li> 7 <li class="item">draggable-item2</li> 8 </vue-draggable-container> 9 <hr /> 10 <vue-draggable-container tag="ul"> 11 <li class="item">draggable-item3</li> 12 </vue-draggable-container> 13 </vue-draggable> 14</script> 15 16<script src="//cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script> 17<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script> 18<script src="//cdn.jsdelivr.net/npm/vue-shopify-draggable/lib/index.js"></script> 19 20<script> 21 Vue.use(VueShopifyDraggable); 22 new Vue({ 23 el: VueEl, 24 template: VueTemplate.innerHTML, 25 data: function () { 26 return { 27 options: { 28 draggable: '.item', 29 }, 30 }; 31 }, 32 methods: { 33 dragStart: function (e) { 34 console.log(e); 35 }, 36 }, 37 }); 38</script>
vue-draggable-container
vue-draggable-container
is always use as children of vue-sortable
, vue-swappable
, vue-droppable
and vue-draggable
.
options
property can set to vue-sortable
, vue-swappable
, vue-droppable
and vue-draggable
.
1<vue-sortable :options="options"></vue-sortable> 2<vue-swappable :options="options"></vue-swappable> 3<vue-droppable :options="options"></vue-droppable> 4<vue-draggable :options="options"></vue-draggable>
tag
property can set to vue-draggable-container
, vue-sortable
, vue-swappable
, vue-droppable
and vue-draggable
.
If you not want to generate a wrapper dom, you can set an empty string for the tag
. Notice: If you set an empty string for the tag
of a component, this component will only render the first slot node.
1<vue-draggable-container tag="div"></vue-draggable-container> 2<vue-sortable tag="ul"></vue-sortable> 3<vue-swappable tag="div"></vue-swappable> 4<vue-droppable tag="section"></vue-droppable> 5<vue-draggable tag="main"></vue-draggable>
Empty string:
1<vue-draggable-container tag=""> 2 <div>rendered</div> 3 <div>not rendered</div> 4</vue-draggable-container>
Shopify draggable is easy to create plugins, those plugins may emit custom events. You can listen those events by set pluginEvents
.
vue-shopify-draggable is already listened all official plugins' events, so only events of third plugins need push in pluginEvents
.
1<vue-draggable pluginEvents="['eventName']"></vue-draggable>
Draggable:
draggable:initialize
draggable:destroy
drag:start
drag:move
drag:over
drag:over:container
drag:out
drag:out:container
drag:stop
drag:stopped
(added in @shopify/draggable@1.0.0-beta.12
)drag:pressure
Sortable:
sortable:start
sortable:sort
sortable:sorted
sortable:stop
Swappable:
swappable:start
swappable:swap
swappable:swapped
swappable:stop'
Droppable:
droppable:start
droppable:dropped
droppable:returned
droppable:stop
Plugins:
mirror:create
mirror:created
mirror:attached
mirror:move
mirror:destroy
collidable:in
collidable:out
snap:in
snap:out
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/24 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More