motion

Animate React components with motion for enter/exit, layout, and gesture-driven transitions.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/cfardev/kanban-hub --skill motion-cfardev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motion
Source: https://github.com/cfardev/kanban-hub/tree/main/.agents/skills/motion
Command: npx skills add https://github.com/cfardev/kanban-hub --skill motion-cfardev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Animating React components can be verbose and brittle; Motion provides a declarative way to build smooth, accessible UI transitions with minimal code.

Core Features & Use Cases

  • Declarative motion primitives: use motion elements (e.g., motion.div) to attach animations directly to DOM nodes.
  • Enter/exit and layout animations: animate on mount/unmount and during layout changes, with gestures (whileHover, whileTap, whileInView) and variants.
  • Scroll awareness and grouping: support in-view triggers, scroll-linked effects, and LayoutGroup to coordinate related elements.
  • Practical examples: create a card list with staggered reveals and interactive hover effects.

Quick Start

Create a simple animated button by wrapping a div with motion.div and configure initial and animate to see a smooth entrance.

Frequently Asked Questions about motion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I animate React components on mount and unmount?

You can animate React components on mount and unmount using the AnimatePresence wrapper with motion elements. This declarative approach handles enter and exit transitions automatically, delivering smooth UI animations when components are added or removed from the DOM.

What is the best way to add scroll-linked animations in a Next.js app?

The best way to add scroll-linked animations in a Next.js app is using motion primitives with whileInView triggers. This approach supports in-view detection and scroll-linked effects to animate elements declaratively as they enter the viewport.

Can I use gestures to trigger UI animations in React?

Yes, you can use gestures to trigger UI animations in React by attaching whileHover, whileTap, or whileInView properties to motion components. These declarative gesture bindings allow interactive UI transitions directly on DOM nodes without manual event listeners.

How do I coordinate staggered layout animations across multiple elements?

You coordinate staggered layout animations across multiple elements using variants and LayoutGroup. Variants define animation states that orchestrate staggered reveals, while LayoutGroup coordinates related motion components to animate smoothly during layout changes.

Does Motion work for layout animations without manually calculating DOM positions?

Yes, Motion handles layout animations automatically without manual DOM position calculations. By applying layout properties to motion components, the library measures and interpolates layout changes, delivering fluid transitions when the DOM structure shifts.