Skip to content
affaan-m avatar

Motion Foundations

Motion tokens, spring presets, and reduced-motion rules for React and Next.js using motion/react.

CCM score
71 of 100
skills.sh installs
9K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the motion system base layer: duration and easing tokens, distance and scale values, and a 5-preset spring map
  • Includes a shouldAnimate() gate that checks reduced-motion preference, low-end hardware, and an essential flag before animating
  • Enforces rules that ban layout-property animation, mixing framer-motion with motion/react, and hydration mismatches from initial states
  • Designed as the foundation layer that motion-patterns and motion-advanced build on, loaded before any animation work

Install

$ npx -y skills add affaan-m/ecc --skill motion-foundations -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Motion Foundations

The base layer of the motion system. Defines every value, constraint, and rule that downstream skills (motion-patterns, motion-advanced) inherit. Load this skill before any animation work begins.

When to Activate

  • Starting any animated component from scratch
  • Setting up tokens, spring presets, or easing values
  • Implementing prefers-reduced-motion support
  • Debugging hydration mismatches from animation initial states
  • Evaluating whether an animation should exist at all

Outputs

This skill produces:

  • A shared motionTokens object (duration, easing, distance, scale)
  • A shared springs preset map (5 named configs)
  • A shouldAnimate() gate used by all components
  • Accessibility-compliant animation defaults via useReducedMotion
  • SSR-safe initial states with zero hydration warnings

Principles

Motion must do at least one of the following or it must be removed:

  • Guide attention
  • Communicate state
  • Preserve spatial continuity

Responsiveness always outranks smoothness. A 60 fps animation that causes input delay is worse than no animation.

Rules

These are non-negotiable. They apply to every component in the system.

Details

Repository
github.com/affaan-m/ecc
Categories
Animation & Motion, Frontend & UI Code
First seen
Jul 14, 2026

Questions

What does the motion-foundations skill do for React and Next.js?

The motion-foundations skill sets up motion tokens, spring presets, performance rules, device adaptation, accessibility enforcement, and SSR safety for React and Next.js using motion/react. It is the base layer that other motion skills depend on, defining the values and constraints they inherit.

How do I install the motion-foundations skill?

Run npx -y skills add affaan-m/ecc --skill motion-foundations -y in your project. After installing, the agent can set up shared motion tokens, a spring preset map, and reduced-motion handling for your components.

Which skills lead the Animation & Motion category, and how does motion-foundations fit in?

motion-foundations ranks in the top 100 on the Animation & Motion category page, alongside remotion-render and several hyperframes skills. Unlike those, it focuses on the shared foundation of tokens, springs, and accessibility rules that the motion-patterns and motion-advanced skills build on.

Does motion-foundations handle reduced motion and hydration issues?

Yes, the skill enforces prefers-reduced-motion by disabling transforms and limiting opacity fades to 0.2 seconds or less. It also keeps initial animation states matching server output to avoid hydration mismatches in Next.js.

More from affaan-m/ecc

All 257

Similar to Motion Foundations

More Animation & Motion