{"id":18974983,"url":"https://github.com/bufferapp/buffer-js-dragme","last_synced_at":"2026-04-08T18:30:17.084Z","repository":{"id":65840770,"uuid":"72132193","full_name":"bufferapp/buffer-js-dragme","owner":"bufferapp","description":"module for dragging components","archived":false,"fork":false,"pushed_at":"2017-02-23T11:13:39.000Z","size":1378,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-16T02:32:57.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@bufferapp/dragme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bufferapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-27T17:33:14.000Z","updated_at":"2019-10-28T16:34:43.000Z","dependencies_parsed_at":"2023-02-13T14:10:11.738Z","dependency_job_id":null,"html_url":"https://github.com/bufferapp/buffer-js-dragme","commit_stats":null,"previous_names":["bufferapp/dragme"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-dragme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-dragme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-dragme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-dragme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bufferapp","download_url":"https://codeload.github.com/bufferapp/buffer-js-dragme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239873635,"owners_count":19711310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T15:16:53.027Z","updated_at":"2026-04-08T18:30:17.030Z","avatar_url":"https://github.com/bufferapp.png","language":"JavaScript","readme":"# @bufferapp/dragme\n\n[![NPM Version](https://img.shields.io/npm/v/@bufferapp/dragme.svg)](https://www.npmjs.com/package/@bufferapp/dragme)\n\nA super lightweight module for dragging elements using CSS3 Transforms. The goal of this module is to be a minimal way to make certain elements draggable on a page, i.e. modal windows.\n\nDragme makes use of some modern JS APIs – make sure to polyfill it depending on the browser support wanted:\n\n- `Element.classList`\n- `Object.assign()`\n- `Element.closest()`\n\n## Install\n\n```\nnpm install @bufferapp/dragme\n```\n\n## Usage\n\n```js\nconst dragMe = new DragMe(document.querySelector('#draggable-component'));\n```\n\nPrevent dragging on certain elements:\n\n```js\nconst dragMe = new DragMe(document.querySelector('#draggable-component'), {\n  cancel: 'textarea, .button',\n});\n```\n\nCleanup bindings to disable a DragMe instance:\n\n```js\ndragMe.cleanup();\n```\n\nListen to when dragging starts and stops using callbacks:\n\n```js\nconst dragMe = new DragMe(document.querySelector('#draggable-component'), {\n  onDragStart: () =\u003e console.log('Started dragging'),\n  onDragEnd: () =\u003e console.log('Stopped dragging'),\n});\n```\n\n\n## Roadmap\n\n- [ ] Use requestAnimationFrame for smoother movement\n\n## Contributing\n\nBug fixes or improvements welcome!\n\n## Credits\n\nThis builds upon [jwilsson](https://github.com/jwilsson)'s non-jQuery fork of Buffer's [jQuery DragMe](https://github.com/bufferapp/jquery-dragme).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-js-dragme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbufferapp%2Fbuffer-js-dragme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-js-dragme/lists"}