Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@kitten-team/draggable
Advanced tools
The JavaScript Drag & Drop library your grandparents warned you about.
Currently in beta! While Draggable is very close to a full release, the API is still subject to change. We keep an updated CHANGELOG with every release, so when upgrading from a previous version, please check and see what has changed.
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.
npm install @shopify/draggable --save
or via yarn:
yarn add @shopify/draggable
or via CDN
<!-- Entire bundle -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/draggable.bundle.js"></script>
<!-- legacy bundle for older browsers (IE11) -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/draggable.bundle.legacy.js"></script>
<!-- Draggable only -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/draggable.js"></script>
<!-- Sortable only -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/sortable.js"></script>
<!-- Droppable only -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/droppable.js"></script>
<!-- Swappable only -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/swappable.js"></script>
<!-- Plugins only -->
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/plugins.js"></script>
Latest ✔ | Latest ✔ | 11+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
Package name | ES6 bundle sizes | ES5 bundle sizes |
---|---|---|
draggable.bundle.js | ~11kb | ~19.2kb |
draggable.bundle.legacy.js | ~19.2kb | ~25.63kb |
draggable.js | ~8.06kb | ~15.36kb |
sortable.js | ~8.93kb | ~16.51kb |
swappable.js | ~8.56kb | ~16.14kb |
droppable.js | ~8.8kb | ~16.55kb |
plugins.js | ~2.37kb | ~8.76kb |
plugins/collidable.js | ~1.45kb | ~7.81kb |
plugins/snappable.js | ~1.19kb | ~6.94kb |
plugins/swap-animation.js | ~1kb | ~6.65kb |
You can find the documentation for each module within their respective directories.
To run the examples
project locally, simply run the following from the draggable
root:
yarn && 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.
We are currently working on v1.0.0-beta.8
. Check out the project board to see tasks and follow progress on the release. Any Pull Requests should be pointed against the feature branch v1.0.0-beta.8
.
Copyright (c) 2018 Shopify. See LICENSE.md for further details.
FAQs
The JavaScript Drag & Drop library your grandparents warned you about.
The npm package @kitten-team/draggable receives a total of 0 weekly downloads. As such, @kitten-team/draggable popularity was classified as not popular.
We found that @kitten-team/draggable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.