Signals in, motion out
Bind an object or a signal and the element animates to the new state. moveValue, moveTransform and moveSpringValue derive motion from signals without a change-detection detour.
Angular Movement · v1.x
Declarative directives on top of the Web Animations API. Start with one attribute; reach for presence, variants, scroll, springs and signals when the interface needs coordinated motion. Built for standalone, zoneless and SSR Angular.
npm install angular-movement Today
An interactive task list: add, complete, expand and remove tasks.
Built only from stable APIs: *movePresenceFor, *movePresence, [moveAnimation], moveWhileHover, moveWhileTap. Honours prefers-reduced-motion.
import { Component, signal } from '@angular/core';
import {
MoveAnimationDirective,
MoveEnterDirective,
MoveLeaveDirective,
MoveHoverDirective,
MovePresenceDirective,
MovePresenceForDirective,
} from 'angular-movement';
@Component({
selector: 'app-tasks',
imports: [
MovePresenceForDirective,
MovePresenceDirective,
MoveAnimationDirective,
MoveEnterDirective,
MoveLeaveDirective,
MoveHoverDirective,
],
template: `
<ul>
<li
*movePresenceFor="let task of tasks(); trackBy: byId"
[moveWhileHover]="{ y: [0, -2] }"
>
<div
[moveAnimation]="{
initial: { scale: 1 },
animate: { scale: task.done ? 0.985 : 1 },
duration: 200
}"
>
{{ task.title }}
</div>
<ng-container *movePresence="task.open">
<p moveEnter="fade-down" moveLeave="fade-up">Details</p>
</ng-container>
</li>
</ul>
`,
})
export class Tasks {
tasks = signal([{ id: 1, title: 'Review PR', done: false, open: false }]);
byId = (_: number, task: { id: number }) => task.id;
}Angular already animates simple enter and leave. Movement exists for the part that is hard to coordinate by hand: motion that is driven by application state.
Bind an object or a signal and the element animates to the new state. moveValue, moveTransform and moveSpringValue derive motion from signals without a change-detection detour.
Playback runs on the Web Animations API, so transforms and opacity stay on the compositor where the browser allows it. Final styles are committed, not left in a fill. No animation runtime to ship.
movePresence and movePresenceFor keep an element mounted until every leave animation has finished, including keyed lists that are reordered or revived mid-exit.
Not sure whether you need it? Read when CSS or Angular's native animations are enough.
Movement is not a replacement for CSS or for Angular's own animate.enter / animate.leave. It adds value when motion has to react to state and be coordinated.
Hover colours, simple transitions, loaders
Enter and leave of elements, Angular 20.2+
Motion driven by state and coordinated across elements
One-off, fully custom effects
A short list of interface problems the library is good at. Each links to a live, configurable demo and to the documentation.
Lift on hover, press on tap, ring on focus — one attribute each, composable.
<div [moveWhileHover]="{ y: [0, -4] }">Uses moveWhileHover, moveWhileTap, moveWhileFocusKeep the panel mounted until its exit animation finishes, then remove it.
<aside *movePresence="open" moveLeave="fade-down">Uses movePresenceAdd, remove and reorder keyed rows without losing identity mid-exit.
<li *movePresenceFor="let r of rows(); trackBy: byId">Uses movePresenceForAnimate between named or object states whenever a signal changes.
<div [moveVariants]="v" [moveVariant]="state()">Uses moveVariants, moveAnimationReveal on entry or scrub a progress animation with scroll position.
<section moveInView="fade-up">Uses moveInView, moveScrollDraw paths and animate icons with presets that normalise SVG transform origins.
<path [moveAnimate]="draw" />Uses movePathDraw, moveIconPulseClick any card to select and replay its native enter animation
Copy and drop this directive into any native Angular component.
<!-- Just add the moveEnter directive -->
<div
moveEnter="fade-up"
[moveDuration]="500"
>
Hello Movement!
</div>Drop the boilerplate. Start animating your Angular 21 applications in minutes with a single import.
npm install angular-movement