Get started with draggable CDN
MIT licensed
Interactive UI component: grabbable and movable by user.
Tags:- shopify
- draggable
- drag-and-drop
- es6
Stable version
Copied!
How to start using draggable CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with draggable CDN - cdnhub.io</title>
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.cdnhub.io/draggable/1.1.3/draggable.min.js"></script>
</head>
<body>
<div id="draggable" class="draggable">
Drag me!
</div>
<script>
const draggableElement = document.getElementById('draggable');
new Draggable(draggableElement, {
type: 'drag', // Enable dragging
boundary: 'parent', // Constrain dragging within parent element
onStart: () => {
console.log('Drag started');
},
onEnd: () => {
console.log('Drag ended');
}
});
</script>
</body>
</html>
All versions
0.0.0-snapshot-release-20230925134331
0.0.0-snapshot-release-20230925200927
0.0.0-snapshot-release-20230925203902
0.0.0-snapshot-release-20230925215731
0.0.0-snapshot-release-20230926234920
0.0.0-snapshot-release-20230927003422
0.0.0-snapshot-release-20230928004141
0.0.0-snapshot-release-20230928012257
1.0.0
1.0.0-beta
1.0.0-beta.10
1.0.0-beta.11
1.0.0-beta.12
1.0.0-beta.13
1.0.0-beta.2
1.0.0-beta.3
1.0.0-beta.4
1.0.0-beta.5
1.0.0-beta.6
1.0.0-beta.7
1.0.0-beta.8
1.0.0-beta.9
1.0.1
1.1.0
1.1.1
1.1.2
*** 1.1.3