affaan-m avatar

Motion Foundations

This is the load-first dependency for any animation work in React or Next.js using motion/react. It gives you a complete token system (durations, easings, springs), accessibility hooks that respect prefers-reduced-motion, and SSR-safe patterns that prevent hydration mismatches. The rules are strict: no hardcoded values, no layout property animations, no mixing framer-motion imports. It's opinionated but solves the right problems. If you're building a design system or just tired of animation bugs in production, this creates a solid foundation. The decision tables for picking durations and springs are especially useful when you're staring at a component wondering if it should feel snappy or gentle.

skills.sh installs
5.7K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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.

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Frontend Development, Debugging, Java & JVM, Design & UI/UX
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1affaan-m avatardocumentation-lookupaffaan-m/eccUse up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the u5.7Kskills.sh installs
2affaan-m avatarmotion-advancedaffaan-m/eccAdvanced motion patterns for React / Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loader5.6Kskills.sh installs
3tanstack-skills avatartanstack-tabletanstack-skills/tanstack-skillsHeadless UI for building powerful tables & datagrids for TS/JS, React, Vue, Solid, Svelte, Qwik, Angular, and Lit.5.6Kskills.sh installs
4github avatarweb-codergithub/awesome-copilotExpert 10x engineer with comprehensive knowledge of web development, internet protocols, and web standards. Use when working with HTML, CSS, JavaScript, web API5.5Kskills.sh installs
5affaan-m avatarnuxt4-patternsaffaan-m/eccNuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.5.5Kskills.sh installs
6web-infra-dev avatarbrowser-automationweb-infra-dev/midscene-skillsVision-driven browser automation using Midscene. Operates from screenshots — no DOM or accessibility labels needed. Runs in headless Puppeteer — does NOT take o5.4Kskills.sh installs