UI Animation Skill: Modern Technical Editorial
Overview
This skill defines the motion design language for the user's projects. It complements the ui-design skill by adding clean, minimalistic interactions using Framer Motion.
🛑 MANDATORY REFERENCE
- •
MOTION_TOKENS.md: Physics constants (Spring 400/10) and Easing curves.- •
ANIMATION_PATTERNS.md: Code for FadeUp, LineDraw, and Stagger.
Core Motion Principles
- •NO ABRUPT APPEARANCES: Nothing should just "pop" into existence.
- •Use
FadeInUpfor content. - •Use
LineDrawfor dividers.
- •Use
- •PHYSICS OVER DURATION: Interactive elements (buttons, hover states) must use Smooth Eased Transitions or Tight Springs.
- •Bad:
transition: { type: "spring", stiffness: 400, damping: 10 }(Too bouncy) - •Good:
transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] }
- •Bad:
- •SUBTLETY OVER ACTION: Motion should be felt, not seen. Hover scales should rarely exceed
1.02. Rotation and "pop" effects are forbidden unless requested. - •EDITORIAL PACING: Entrances should be slow and smooth (
0.8s). Avoid jarringly fast animations. - •STAGGER EVERYTHING: Lists and grids must cascade. Never animate a whole block as one rigid unit.
When using React/Next.js:
- •Install:
npm install framer-motion - •Import:
import { motion } from 'framer-motion' - •CUSTOM COMPONENTS: If animating Next.js
<Link>or other library components, you MUST use themotion()wrapper (e.g.,const MotionLink = motion(Link)) to prevent React DOM prop warnings. - •Replace HTML tags with
motiontags (e.g.,motion.div,motion.button). - •Copy variants directly from
ANIMATION_PATTERNS.md.
When using Vanilla CSS (Fallback):
- •Use
transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1)to mimic the Framer curve.