Gathering detailed insights and metrics for @shopify/draggable
Gathering detailed insights and metrics for @shopify/draggable
Gathering detailed insights and metrics for @shopify/draggable
Gathering detailed insights and metrics for @shopify/draggable
The JavaScript Drag & Drop library your grandparents warned you about.
npm install @shopify/draggable
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
18,021 Stars
477 Commits
1,087 Forks
615 Watching
30 Branches
6,962 Contributors
Updated on 27 Nov 2024
JavaScript (73.83%)
TypeScript (26.17%)
Cumulative downloads
Total Downloads
Last day
0.5%
10,616
Compared to previous day
Last week
1.2%
56,529
Compared to previous week
Last month
-11.1%
249,464
Compared to previous month
Last year
56.1%
3,418,167
Compared to previous year
31
Draggable is no longer maintained by its original authors. Maintenance of this repo has been passed on to new collaborators and is no longer worked on by anyone at Shopify.
We are still looking for more maintainers! If anyone is interested in answering / triaging issues, reviewing / rejecting / approving PRs, and authoring code for bug fixes / new features — please send an email to max.hoffmann (at) shopify (dot) com
. You may be asked a few questions before obtaining collaboration permission, but if everything checks out, we will happily add you as a collaborator.
Get complete control over drag and drop behaviour with Draggable! Draggable abstracts
native browser events into a comprehensive API to create a custom drag and drop experience.
Draggable
comes with additional modules: Sortable
, Droppable
, Swappable
. Draggable
itself does not perform any sorting behaviour while dragging, but does the heavy lifting, e.g.
creates mirror, emits events, manages sensor events, makes elements draggable.
The additional modules are built on top of Draggable
and therefore provide a similar API
interface, for more information read the documentation below.
Features
You can install the library via npm.
1npm install @shopify/draggable --save
or via yarn:
1yarn add @shopify/draggable
or via CDN
1<!-- Entire bundle --> 2<script type="module"> 3 import { 4 Draggable, 5 Sortable, 6 Droppable, 7 Swappable, 8 } from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/index.mjs'; 9</script> 10<!-- Draggable only --> 11<script type="module"> 12 import Draggable from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/Draggable/Draggable.mjs'; 13</script> 14<!-- Sortable only --> 15<script type="module"> 16 import Sortable from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/Sortable/Sortable.mjs'; 17</script> 18<!-- Droppable only --> 19<script type="module"> 20 import Droppable from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/Droppable/Droppable.mjs'; 21</script> 22<!-- Swappable only --> 23<script type="module"> 24 import Swappable from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/Swappable/Swappable.mjs'; 25</script> 26<!-- Plugins only --> 27<script type="module"> 28 import * as Plugins from 'https://cdn.jsdelivr.net/npm/@shopify/draggable/build/esm/Plugins/index.mjs'; 29</script> 30<!-- UMD browser --> 31<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable/build/umd/index.min.js"></script> 32<script> 33 console.log(window.Draggable); 34</script>
Check the "browserlist" property in package.json for more info
Last 3 versions ✔ | Last 3 versions ✔ | Last 3 versions ✔ | Last 3 versions ✔ | Last 3 versions ✔ |
You can find the documentation for each module within their respective directories.
Draggable includes TypeScript definitions.
To run the examples
project locally, simply run the following from the draggable
root:
1yarn && yarn start
This will start a server that hosts the contents of examples/
. It also watches for file
changes from both src/
and examples/src
and reloads the browser.
Contributions are more than welcome, the code base is still new and needs more love.
For more information, please checkout the contributing document.
Copyright (c) 2018-present Shopify. See LICENSE.md for further details.
No vulnerabilities found.
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
Found 1/7 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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 2024-07-01
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