Vue Moveable

The Moveable project written in Vue

My Work

I added a typescript declaration file,
as users were receiving a typescript error
when trying to import the library into a TS project.



Vue Moveable

npm version github stars license Minified library size React Preact Angular Vue

A Vue Component that create Moveable, Draggable, Resizable, Scalable, Rotatable, Warpable, Pinchable, Groupable, Snappable.

Edit Vue Moveable Demo

Draggable Resizable Scalable Rotatable
Warpable Pinchable Groupable Snappable

🔥 Features

  • Draggable refers to the ability to drag and move targets.
  • Resizable indicates whether the target's width and height can be increased or decreased.
  • Scalable indicates whether the target's x and y can be scale of transform.
  • Rotatable indicates whether the target can be rotated.
  • Warpable indicates whether the target can be warped(distorted, bented).
  • Pinchable indicates whether the target can be pinched with draggable, resizable, scalable, rotatable.
  • Groupable indicates Whether the targets can be moved in group with draggable, resizable, scalable, rotatable.
  • Snappable indicates whether to snap to the guideline.
  • Support SVG Elements (svg, path, line, ellipse, g, rect, ...etc)
  • Support Webkit Safari (Mac, iOS)
  • Support 3d Transform

⚙️ Installation

$ npm i vue-moveable

📄 Documents

🚀 How to use

    <span>Vue Moveable</span>
import Moveable from 'vue-moveable';

export default {
  name: 'app',
  components: {
  data: () => ({
    moveable: {
      draggable: true,
      throttleDrag: 0,
      resizable: false,
      throttleResize: 1,
      keepRatio: false,
      scalable: true,
      throttleScale: 0,
      rotatable: true,
      throttleRotate: 0,
      pinchable: true, // ["draggable", "resizable", "scalable", "rotatable"]
      origin: false,
  methods: {
    handleDrag({ target, transform }) {
      console.log('onDrag left, top', transform); = transform;
      target, width, height, delta,
    }) {
      console.log('onResize', width, height);
      delta[0] && ( = `${width}px`);
      delta[1] && ( = `${height}px`);
    handleScale({ target, transform, scale }) {
      console.log('onScale scale', scale); = transform;
    handleRotate({ target, dist, transform }) {
      console.log('onRotate', dist); = transform;
    handleWarp({ target, transform }) {
      console.log('onWarp', transform); = transform;
    handlePinch({ target }) {
      console.log('onPinch', target);


Library use few browser built-ins and doesn't include polyfills for them. This ensures you don't include unnecessary polyfills in your code, as it should be the responsibility of the consuming app to include them.

Vue CLI includes them in babel config by default but here is a list (in case you what to add them manually):

# for core-js@2
es6.symbol        # optional

# for core-js@3
es.symbol         # optional

For direct usage in browser consider using

⚙️ Developments

npm run serve

Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

👏 Contributing

If you have any questions or requests or want to contribute to vue-moveable or other packages, please write the issue or give me a Pull Request freely.

🐞 Bug Report

If you find a bug, please report to us opening a new Issue on GitHub.

📝 License

This project is MIT licensed.