ng-gsap

Signals-first GSAP for Angular.

GSAP does the animating. This library handles the part that's tedious in a component: knowing when to re-run an animation, and cleaning up what it made.

box.ts
private stage = viewChild.required<ElementRef>('stage');
protected open = signal(false);

injectGSAP(() => {
  // `open` is read here, so this re-runs whenever it changes
  gsap.to('.box', { x: this.open() ? 220 : 0 });
}, { scope: this.stage });

protected toggle() {
  this.open.update((v) => !v);
}

Nothing above declares what the animation depends on. Angular already tracks the signals you read, so reading open() inside the callback is enough — flip it and the animation re-runs, with the previous run already reverted.

Nothing to declareDependencies come from the signals you actually read. No list to write or keep in sync.
Nothing to clean upEvery tween the callback makes is reverted before it re-runs, and again on destroy.
Safe to server-renderRuns in the render phase, which never executes on the server. No platform checks.
Built for zonelessGSAP's ticker stays out of Angular; signals notify the template directly.

Core

Scroll

Plugins