{"id":27899221,"url":"https://github.com/c4benni/ui-transition","last_synced_at":"2026-05-09T06:35:50.759Z","repository":{"id":57689848,"uuid":"452062130","full_name":"c4benni/ui-transition","owner":"c4benni","description":"An advanced, performant Vue Transition experience with springs","archived":false,"fork":false,"pushed_at":"2022-04-11T18:06:53.000Z","size":569,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T19:21:58.554Z","etag":null,"topics":["animation","animation-css","spring","transition","typescript","vue","vue3","vuejs"],"latest_commit_sha":null,"homepage":"https://github.com/c4benni/ui-transition#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c4benni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-25T22:23:21.000Z","updated_at":"2022-06-03T07:36:48.000Z","dependencies_parsed_at":"2022-09-26T20:53:49.148Z","dependency_job_id":null,"html_url":"https://github.com/c4benni/ui-transition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c4benni/ui-transition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4benni%2Fui-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4benni%2Fui-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4benni%2Fui-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4benni%2Fui-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c4benni","download_url":"https://codeload.github.com/c4benni/ui-transition/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4benni%2Fui-transition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","animation-css","spring","transition","typescript","vue","vue3","vuejs"],"created_at":"2025-05-05T19:23:52.627Z","updated_at":"2026-05-09T06:35:50.740Z","avatar_url":"https://github.com/c4benni.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n# UiTransition\n  \n#### *Create dynamic CSS spring animations*\n  \n\u003c/div\u003e\n\n## Intro\n\nUiTransition is a Vue JS **_component_** that tries to provide an easy way to use **_spring animations_** for enter and leave states of DOM nodes. Although there is an API available to get an array of spring values, _this package was created to be used as a component, not a fully fledged animation library._\n\n\u003chr/\u003e\n\n## Quick peek\n\n_config can be customized to your taste_\n\n```vue\n// basic\n\u003cUiTransition config=\"slideX\"\u003e\n    \u003cdiv v-if=\"show\" /\u003e\n\u003c/UiTransition\u003e\n\n// with arguments\n\u003cUiTransition config=\"slideX(0, 100)\"\u003e\n    \u003cdiv v-if=\"show\" /\u003e\n\u003c/UiTransition\u003e\n\n// different entrance and exit animations\n\u003cUiTransition\n  :config=\"{\n    enter: 'slideX',\n    leave: 'fade(0, 0.75)',\n  }\"\n\u003e\n    \u003cdiv v-if=\"show\" /\u003e\n\u003c/UiTransition\u003e\n```\n\n## Get started\n\n```bash\n$ npm i ui-transition\n```\n\n```ts\n// import App, and createApp\n\nimport UiTransition from \"ui-transition\";\n\nconst app = createApp(App);\n\n// basic\napp.use(UiTransition);\n\n// with your configurations\napp.use(UiTransition, {\n  // set default values,\n  // build animations,\n  // set spring presets,\n  // or leave it blank...\n  // spring presets, and animations\n  // can be created on the fly.\n});\n```\n\n## The why...\n\nI'm a big fan of smooth transitioning with a natural feel for DOM nodes. This library was created to simplify that process of using a spring animation that will run at ~60FPS. **_Even on low power mode._**\n\u003cbr\u003e\nTo be honest, [`raf`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) won't achive that kind of performance, even when animating composite properties (transform, opacity). If you need to make a bulky request, be ready for some janky animations.\n\u003cbr\u003e\nThis is where `\u003cUiTransition /\u003e` comes in 👨‍🏫. `\u003cUiTransition /\u003e` uses `CSS Keyframes` which utilizes [off main thread animation](https://developer.mozilla.org/en-US/docs/Web/Performance/CSS_JavaScript_animation_performance#off_main_thread_animation) so you can be sure to do CPU draining tasks with your DOM node on the main thread, without having it interupted with calculations on every frame to create _spring animations_, ensuring a butter smooth animation with a natural feel.\n\n## Props\n\n- ### `config`\n\nThis is where all the magic happens. A dynamic prop that accepts different types. If `false` is passed here, no animation will be used.\n\n##### `propType`\n\n`string | boolean | BuildAnim`\n\n\u003cdetails\u003e\n\u003csummary\u003e\n  \u003cstrong\u003e\n    \u003ccode\u003etypes\u003c/code\u003e\n  \u003c/strong\u003e\n\u003c/summary\u003e\n\n\u003cdiv\u003e\n\nCustom types assosiated with the `config` prop. The `BuildAnim` type above is explained below.\n\n```ts\n// This is the BuildAnim type\ninterface BuildAnim extends Anim {\n  enter?: Anim;\n  leave?: Anim;\n}\n\ninterface Anim {\n  frame: Frame;\n  extends?: string;\n  duration?: DurationAndDelay;\n  delay?: DurationAndDelay;\n  ease?: Ease;\n  spring?: Spring;\n}\n\ntype Frame = (step: Step, phase: AnimPhase) =\u003e DynamicObject\u003cstring | number\u003e;\n\ntype Step = (\n  from: number | number[],\n  to: number | number[]\n) =\u003e number | number[];\n\ntype AnimPhase = \"enter\" | \"leave\";\n\ninterface DynamicObject\u003cT\u003e {\n  [key: string]: T;\n}\n\ntype DurationAndDelay = number | AnimPhaseObject\u003cnumber\u003e | undefined;\n\ntype AnimPhaseObject\u003cT\u003e = {\n  [key in AnimPhase]?: T;\n};\n\ntype Ease = string | AnimPhaseObject\u003cstring\u003e;\n\ntype Spring = string | AnimPhaseObject\u003cSpringRoot\u003e;\n\ntype SpringRoot = string | SpringObject;\n\ntype SpringObject = {\n  tension?: number;\n  friction?: number;\n  mass?: number;\n  precision?: number;\n  velocity?: number;\n  stopAttempt?: number;\n};\n```\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n##### `default`\n\n`'fade'`\n\n\u003c!-- TODO: spring --\u003e\n\n- ### `delay`\n\nSet animation delay.\n\n##### `propType`\n\n`number` | `{enter?: number; leave?: number}`\n\n- ### `duration`\n\nControl how long your spring animations should last!\n\n\u003e Leave `undefined` for the default spring feel\n\n##### `propType`\n\n`number` | `{enter?: number; leave?: number}`\n\n- ### `ease`\n\nControl the easing curve of your spring animation! Use css easings like `ease-out`, or a cubic bezier function to add more dynamics to your animations!\n\n\u003e Use `'linear'` for the default spring feel\n\n##### `propType`\n\n`string` | `{enter?: string; leave?: string}`\n\n##### `default`\n\n`'linear'`\n\n- ### `group`\n\nUsed to set the underlying component to `\u003cTransitionGroup /\u003e` rather than default `\u003cTransition /\u003e`\n\n\u003e Read more about Vue's `\u003cTransitionGroup /\u003e` [here](https://vuejs.org/api/built-in-components.html#transitiongroup)\n\n##### `propType`\n\n`boolean`\n\n- ### `retainFinalStyle`\n\nUseful when you need an element to stay in its final animation position. Default behavior is to remove all animation styles applied.\n\n##### `propType`\n\n`boolean`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4benni%2Fui-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc4benni%2Fui-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4benni%2Fui-transition/lists"}