{"id":50372411,"url":"https://github.com/Andersseen/angular-movement","last_synced_at":"2026-06-01T10:00:41.447Z","repository":{"id":345600813,"uuid":"1179165542","full_name":"Andersseen/angular-movement","owner":"Andersseen","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T19:54:37.000Z","size":624,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T21:24:03.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://angular-movement.andersseen.dev","language":"TypeScript","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/Andersseen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-11T18:52:52.000Z","updated_at":"2026-05-23T19:54:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Andersseen/angular-movement","commit_stats":null,"previous_names":["andersseen/angular-movement"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Andersseen/angular-movement","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andersseen%2Fangular-movement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andersseen%2Fangular-movement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andersseen%2Fangular-movement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andersseen%2Fangular-movement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andersseen","download_url":"https://codeload.github.com/Andersseen/angular-movement/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andersseen%2Fangular-movement/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33769492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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":[],"created_at":"2026-05-30T08:00:26.068Z","updated_at":"2026-06-01T10:00:41.434Z","avatar_url":"https://github.com/Andersseen.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Animations"],"readme":"# angular-movement\n\nAngular motion ecosystem with two parts in one repository:\n\n- Reusable npm library for animation directives in Angular.\n- Demo and documentation site to explore behavior and integration patterns.\n\n## What This Project Is\n\nThis is an open source Angular monorepo focused on declarative UI motion.\nIt provides production-ready directives for common animation workflows and a live playground-style app to evaluate them.\n\nRepository structure:\n\n- Library package: projects/movement\n- Demo and docs app: src\n\n## What Problems It Solves\n\nUI animation in Angular often becomes repetitive and hard to maintain:\n\n- Rewriting enter and leave transitions for each component.\n- Mixing imperative animation logic into component code.\n- Inconsistent timings and easing across teams.\n- Missing orchestration for staggered lists and exit animations.\n- Friction when implementing interactions like hover, in-view, parallax, and scroll progress.\n- Lack of first-class SVG path-drawing animation support.\n\nangular-movement addresses this with declarative directives and global configuration so animation rules stay consistent and composable.\n\n## Core Capabilities\n\n- Preset animations: fade, slide, zoom, flip, blur, bounce, pulse, spin, icon-draw, icon-pulse, icon-bounce.\n- Custom keyframes for full control.\n- Spring physics support.\n- Interaction directives: hover, tap, focus, in-view, scroll, parallax, drag.\n- Presence orchestration to let leave animations finish before DOM removal.\n- Stagger orchestration for coordinated list motion.\n- **SVG path drawing** with `pathLength` / `pathOffset` (WAAPI-powered).\n- **Per-property transitions** for different duration / delay per animated property.\n- **Trigger directive** for one-shot boolean triggers with imperative controls.\n\n## Install The Library\n\nFrom npm:\n\n```bash\nnpm install angular-movement\n```\n\nPeer dependencies:\n\n- @angular/core ^21.2.0\n- @angular/common ^21.2.0\n\n## Use The Library In Your App\n\n1. Add global defaults with provideMovement.\n2. Import MOVEMENT_DIRECTIVES in standalone components.\n3. Use directives directly in templates.\n\nExample:\n\n```ts\nimport { ApplicationConfig } from '@angular/core';\nimport { provideMovement } from 'angular-movement';\nimport { MOVEMENT_DIRECTIVES } from 'angular-movement';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideMovement({\n      duration: 320,\n      easing: 'cubic-bezier(0.16, 1, 0.3, 1)',\n      delay: 0,\n      disabled: false,\n    }),\n  ],\n};\n\nimport { Component } from '@angular/core';\nimport { MOVEMENT_DIRECTIVES } from 'angular-movement';\n\n@Component({\n  selector: 'app-demo-card',\n  standalone: true,\n  imports: [...MOVEMENT_DIRECTIVES],\n  template: `\n    \u003ch2 [move]=\"'fade-up'\"\u003eHello movement\u003c/h2\u003e\n    \u003cbutton [moveWhileHover]=\"{ scale: [1, 1.05] }\"\u003eHover me\u003c/button\u003e\n  `,\n})\nexport class DemoCardComponent {}\n```\n\n## SVG Icon Animations\n\nangular-movement v0.2.0 adds first-class support for SVG path drawing and icon micro-animations.\n\n### Path drawing\n\nAnimate `pathLength` from `0` to `1` to draw a stroke. The engine automatically measures the element's total length and converts it to WAAPI-compatible `strokeDasharray` / `strokeDashoffset` keyframes.\n\n```html\n\u003csvg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\u003e\n  \u003cpath\n    [moveTarget]=\"animate()\"\n    [moveFrames]=\"{ pathLength: [0, 1], opacity: [0, 1] }\"\n    moveDuration=\"700\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    stroke-width=\"2\"\n    d=\"M4 12l4-4 4 4 8-8\"\n  /\u003e\n\u003c/svg\u003e\n```\n\n### Icon helpers\n\nImport helper functions to quickly create icon keyframes:\n\n```ts\nimport { movePathDraw, moveIconPulse } from 'angular-movement';\n```\n\n```html\n\u003cpath\n  [moveTarget]=\"animate()\"\n  [moveFrames]=\"movePathDraw({ opacity: [0, 0.72, 0] })\"\n  moveDuration=\"760\"\n/\u003e\n```\n\n### Motion-style variants with per-property transitions\n\nDeclare states like Framer Motion and override timing per property:\n\n```html\n\u003cpath\n  [moveVariants]=\"{\n    normal: { pathLength: 1, opacity: 1 },\n    draw: {\n      pathLength: [0, 1],\n      opacity: [0, 0.72, 0],\n      transition: { duration: 760, opacity: { duration: 300, delay: 100 } }\n    }\n  }\"\n  [moveAnimate]=\"animate() ? 'draw' : 'normal'\"\n/\u003e\n```\n\n### One-shot trigger (no reverse)\n\nUse `moveTrigger` when you want to play an animation on `true` and reset cleanly on `false` (no reverse animation):\n\n```html\n\u003cpath\n  #motion=\"moveTrigger\"\n  [moveTrigger]=\"animate()\"\n  [moveFrames]=\"{ pathLength: [0, 1], opacity: [0, 1] }\"\n  moveDuration=\"700\"\n  moveResetState=\"clear\"\n/\u003e\n```\n\nOr call it imperatively from TypeScript:\n\n```ts\n@ViewChild('motion') motion!: MoveTriggerDirective;\n\nthis.motion.play();\nthis.motion.reset();\nthis.motion.set({ opacity: 0.5, pathLength: 0.5 });\n```\n\n## What You Can Explore In The Demo\n\nThe demo site includes focused pages for:\n\n- Animate\n- Enter and Leave\n- Hover and Tap\n- In View\n- Scroll and Parallax\n- Presence\n- Layout\n- Drag\n- Variants\n- Text animation\n- SVG Icons (new in v0.2.0)\n\nThese pages show both visual behavior and integration patterns you can copy into real projects.\n\n## Open Source Goals\n\n- Keep API ergonomic for Angular teams using standalone components.\n- Provide predictable animation defaults with opt-in customization.\n- Maintain examples and docs close to source code.\n- Favor SSR-safe and production-oriented implementation details.\n\n## Contributing\n\nContributions are welcome through issues and pull requests.\nWhen proposing changes, include:\n\n- Problem statement and expected behavior.\n- API impact, if any.\n- Tests or demo updates for new behavior.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndersseen%2Fangular-movement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndersseen%2Fangular-movement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndersseen%2Fangular-movement/lists"}