What does this skill do?

La Motion Avanzado Skill resuelve la construcción de interacciones de manipulación directa y animaciones derivadas de valores reactivos en React y Next.js sin re-renders. Cubre drag & drop con física, gestos, animación de texto palabra a palabra, trazado y morphing SVG, hooks personalizados y secuencias imperativas con useAnimate, todo siguiendo reglas estrictas de rendimiento y limpieza.

Sheets and Drag-and-Drop Lists
Build bottom sheets that close when swiped, swipe detection with offset and speed, and reorderable lists using Reorder.Group.
Text Animation
Animate text word by word, character by character, or as a live numeric counter with mandatory cleanup.
SVG Paths and Morphing
Draw paths with a `pathLength` ranging from 0 to 1, morph icons, and animate circular progress rings using `strokeDashoffset`.
Custom Hooks
Create `useScrollReveal`, a magnetic button, a cursor follower using `useSpring`, and gesture hooks such as swipe and long press.

Usage examples

🖱️ Scrollable sheet
Create a bottom sheet that closes when you swipe down, using an offset greater than 120px or a speed greater than 500.
🎬 Imperative sequence
Use `useAnimate` to generate a multi-step animation sequence that displays three elements in order using `async/await`.
🔢 Animated counter
Create a numeric counter that animates from 0 to 1000 using motionTokens and includes cleanup in the useEffect.
🎯 Cursor Follower
Create a smooth cursor that follows the mouse using `useSpring` and `useMotionValue` without triggering re-renders.

Features

Drag & Drop con Física Drag-and-drop with physics using `dragTransition` with `springs.release` and reorderable lists with `Reorder.Group`.
Animation Without Re-renders Motion values using `useMotionValue` and `useSpring` are updated every frame without causing re-renders or hydration errors in SSR.
Interrupt-Safe Sequences `useAnimate` with `async/await` allows you to chain multi-step animations; a new call automatically cancels the current animation.
Custom Gesture Hooks Implement useScrollReveal, useHoverScale, useInViewOnce, the magnetic button, and swipe detection with offset and velocity.
Loaders and Load States Creates spinners, shimmering skeletons, pulse dots, and buttons with loading states, and pauses infinite animations when the document is hidden.

Frequently asked questions

Yes. This skill requires "motion-foundations," since all tokens (motionTokens, springs) are imported from there, and inline numbers are never used.
Yes. Motion values update every frame without causing re-renders or hydration errors in SSR. Use "use client" in your animation components.
Calls to animate() are interrupt-safe: a new call automatically cancels the current animation and resumes at the current speed.
Yes, but the paths must have the same number and type of commands. If they don't match, the animation will jump instead of interpolating smoothly.
Advanced Motion — Complex Animations in React and Next.js

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.