Path Animations

PRO

Animate elements along SVG paths with predefined shapes, trail effects, particles, morphing, and advanced motion controls

Pro Features

Unlock advanced capabilities with the Pro version

8 Predefined Paths

Circle, ellipse, spiral, infinity, heart, star, wave, zigzag shapes built-in

Advanced Motion

Scale, opacity, rotation animations with customizable ranges

Visual Effects

Trail effects, particle systems, and glow for enhanced visuals

Direction Control

Normal, reverse, and alternate playback with various easing functions

Auto-Rotation

Automatically rotates element to follow path tangent

Custom Paths

Support for custom SVG path strings with full control

Installation

Install via CLI

npx @moontra/moonui-cli add path-animations

Usage

Pro Required
Circular Path
Auto-Rotate

Examples

Predefined Path Shapes

PRO

8 built-in path shapes: circle, ellipse, spiral, infinity, heart, star, wave, zigzag

Pro Required
Circle
Heart
Star
Infinity
Wave
Spiral
Zigzag
Ellipse

Trail & Particle Effects

PRO

Add motion trails and particle systems for enhanced visual feedback

Pro Required

Trail Effect

5 trail points

Particles

15 particles

Combined

Trail + Particles

Direction & Easing Functions

PRO

Control animation direction and timing with various easing functions

Pro Required

Normal + Linear

normal

Reverse + Ease-In-Out

reverse

Alternate + Ease-Out

alternate

Advanced Motion: Scale, Opacity & Rotation

PRO

Combine multiple animation properties for complex motion patterns

Pro Required

Scale + Opacity + Glow

Scale: 0.5-1.5x
Opacity: 0.4-1

Full Effects Combo

Scale
Trail
Particles

Morphing Between Shapes

PRO

Set `morph` and hand `morphPaths` a list of shapes: the path itself tweens from one silhouette to the next while the element keeps travelling along it. `morphDuration` controls each transition, `delay` holds the whole animation back before the first run, and `loopCount` caps how many times it repeats (leave it off for an endless loop).

Pro Required

Circle → Star → Heart

morphDuration: 1200ms
loopCount: 3

Partial Arcs, Custom Easing & Lifecycle Callbacks

PRO

`offsetStart` / `offsetEnd` clip the travelled span to a slice of the path (0–1), so the element sweeps an arc instead of the full loop. `cubicBezier` replaces the named easing with your own curve, `rotationOffset` re-aims the element when `autoRotate` is on, and `pathDashArray` renders the guide as a dashed stroke. The three callbacks — `onAnimationStart`, `onAnimationComplete`, `onPositionUpdate` — drive the live readout below.

Pro Required

Lifecycle + Easing + Dashed Path

state: idle
progress: 0%

Partial Arc (10% → 60%)

offsetStart: 0.1
offsetEnd: 0.6