motion

Automate React component animations using the motion/react API.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/stephanofer/finance-trackerv2 --skill motion-stephanofer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motion
Source: https://github.com/stephanofer/finance-trackerv2/tree/main/.opencode/skill/motion
Command: npx skills add https://github.com/stephanofer/finance-trackerv2 --skill motion-stephanofer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Motion provides a simple, consistent way to add smooth, high-performance animations to React components, eliminating ad-hoc CSS tricks and scattered animation logic.

Core Features & Use Cases

  • Basic animated components using motion elements for transitions, entrances, and exits.
  • Gesture support with whileHover, whileTap, and in-view animations to enhance interactivity.
  • Layout animations for auto-arranging grids, panels, and lists with minimal code.
  • Variants and staggering to orchestrate complex animation sequences across multiple components.
  • Exit animations and presence controls via AnimatePresence to manage component lifecycles.
  • Scroll- and visibility-triggered animations for engaging, performant UI.

Quick Start

Install the library (npm install motion) and import { motion } from "motion/react". Then render a basic motion.div with initial, animate, and exit props to see a simple animation.

Frequently Asked Questions about motion

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

FAQPage Schema
How do I add smooth React animations to UI components without writing custom CSS?

React UI animation is simplified by using motion elements with initial, animate, and exit props. This approach replaces scattered CSS tricks with a deterministic, high-performance API for transitions, entrances, and exits.

How do I animate component exit transitions in React when components unmount?

Exit animations in React are handled using AnimatePresence to manage component lifecycles. Wrapping components in AnimatePresence allows you to define exit props on motion elements, ensuring smooth exit transitions before unmounting.

Can I use gesture interactions like hover and tap for React component animations?

Gesture interactions are supported using whileHover, whileTap, and in-view props on motion elements. These props enhance interactivity by automatically triggering animations when users hover, tap, or scroll components into view.

What is the best way to orchestrate staggered animation sequences across multiple React components?

Orchestrating complex animation sequences is achieved using variants and staggering. Variants define animation states for parent and child components, allowing synchronized, staggered transitions across lists and grids with minimal code.

How do I auto-arrange React grid and panel layouts smoothly when items change?

Layout animations auto-arrange grids, panels, and lists smoothly when items are added or removed. By applying layout props to motion elements, the React UI automatically transitions items to their new positions deterministically.

Do I need to install external dependencies to use motion for React UI animations?

You need to install the motion library via npm install motion. After installation, import the motion API from motion/react to start rendering animated components with variants, gestures, and layout support.