{"id":13701386,"url":"https://github.com/posva/vue-tweezing","last_synced_at":"2025-04-10T21:22:11.645Z","repository":{"id":57396724,"uuid":"119186833","full_name":"posva/vue-tweezing","owner":"posva","description":"💃 Easy, customizable and automatic tweening nicely served in scoped slots","archived":false,"fork":false,"pushed_at":"2019-06-18T23:02:03.000Z","size":139,"stargazers_count":99,"open_issues_count":4,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T15:38:30.242Z","etag":null,"topics":["animation","component","motion","scoped-slot","tween","vue"],"latest_commit_sha":null,"homepage":"https://posva.net/vue-tweezing","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/posva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"posva","patreon":"posva","custom":"https://www.paypal.me/posva"}},"created_at":"2018-01-27T17:37:11.000Z","updated_at":"2025-02-11T21:33:49.000Z","dependencies_parsed_at":"2022-09-13T12:02:45.068Z","dependency_job_id":null,"html_url":"https://github.com/posva/vue-tweezing","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvue-tweezing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvue-tweezing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvue-tweezing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvue-tweezing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posva","download_url":"https://codeload.github.com/posva/vue-tweezing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299024,"owners_count":21080449,"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":["animation","component","motion","scoped-slot","tween","vue"],"created_at":"2024-08-02T20:01:34.798Z","updated_at":"2025-04-10T21:22:11.615Z","avatar_url":"https://github.com/posva.png","language":"JavaScript","funding_links":["https://github.com/sponsors/posva","https://patreon.com/posva","https://www.paypal.me/posva"],"categories":["Components","JavaScript"],"sub_categories":["What are scoped slots? :microscope:"],"readme":"# VueTweezing [![Build Status](https://badgen.net/circleci/github/posva/vue-tweezing)](https://circleci.com/gh/posva/vue-tweezing) [![npm package](https://badgen.net/npm/v/vue-tweezing)](https://www.npmjs.com/package/vue-tweezing) [![coverage](https://badgen.net/codecov/c/github/posva/vue-tweezing)](https://codecov.io/github/posva/vue-tweezing) [![thanks](https://badgen.net/badge/thanks/♥/pink)](https://github.com/posva/thanks)\n\n\u003e Easy, customizable and automatic tweening nicely served in scoped slots\n\nVueTweezing works with any tweening engine and provide easy integration with some engines like\n[tween.js](https://github.com/tweenjs/tween.js) and [Tweezer](https://github.com/jaxgeller/tweezer.js/)\n\n[Demo](https://state-animations-amsterdam.surge.sh/polygon), [source](https://github.com/posva/state-animation-demos/blob/master/pages/polygon.vue)\n\n## Usage\n\nInstall it as a plugin:\n\n```js\nimport { Tweezing, tweezerHelper } from 'vue-tweezing'\n// import Tweezer to use it as our Tweening engine\nimport Tweezer from 'tweezer.js'\n\n// install the plugin with as many engines as you want\n// use the tweezerHelper to generate the function\n// needed by VueTweezing to handle tweezing\nVue.use(Tweezing, {\n  tweezer: tweezerHelper(Tweezer),\n})\n```\n\nUse it as a component:\n\n```vue\n\u003cTweezing ref=\"tweezing\" :to=\"value\" duration=\"500\" @end=\"doSomething\"\u003e\n  \u003cpre slot-scope=\"tweenedValue\"\u003e\n    target: {{ value }}\n    val: {{ tweenedValue }}\n  \u003c/pre\u003e\n\u003c/Tweezing\u003e\n```\n\nChange `value` as you would usually do:\n\n```js\nconst vm = new Vue({\n  el: '#app',\n  data: {\n    value: 0,\n  },\n})\n// somewhere else\nvm.value = 200\n```\n\nYou can play with the tween object by accessing the property `$tween` in the `Tweening` component:\n\n```js\n// given the example above\nvm.$refs.tweezing.$tween.stop()\n```\n\n## Passing tweening options\n\nAny prop passed to `Tweezing` different from `tween` and `to` will be considered an option and passed\n\n## Supported Tweening engines\n\nWIP\n\n### Tweezer\n\n### Tween.js\n\n### Adding your own\n\nWIP\n\nYou can check the examples in `src/index.js` to see how to create your own helpers.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fvue-tweezing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposva%2Fvue-tweezing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fvue-tweezing/lists"}