motion-advanced
하는 일
이 도구는 React나 Next.js로 만든 웹사이트에 복잡하고 상호작용하는 애니메이션을 만들 수 있게 합니다. 요소가 움직이고, 터치에 반응하고, 모양을 바꾸도록 도와줍니다. 예를 들어 그림이 나타나거나 글자가 스스로 입력되는 효과를 만들 수 있습니다.
사용하는 경우
- ✓화면에서 항목을 드래그할 수 있게 만들고 싶을 때.
- ✓글자나 단어가 하나씩 나타나도록 만들고 싶을 때.
- ✓애니메이션 SVG 그림이나 마우스를 올렸을 때 바뀌는 버튼을 만들 때.
스킬 링크
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/motion-advanced/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“카드를 좌우로 드래그할 수 있고, 너무 멀리 끌면 사라지는 애니메이션을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
내부적으로는 화면에서 요소의 움직임을 제어하는 고급 기법을 사용합니다. 애니메이션을 연속으로 또는 순서대로 만들 수 있으며, 터치 기기에서도 매끄럽고 끊김 없이 작동하도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Motion Advanced
Complex, interactive, and physics-based animation patterns.
Requires motion-foundations to be set up first.
Use these when motion-patterns is not enough.
When to Activate
- Building drag-to-dismiss sheets, swipe gestures, or reorderable lists
- Animating text word-by-word, character-by-character, or as a live counter
- Drawing SVG paths, morphing icons, or animating circular progress
- Writing a custom animation hook (
useScrollReveal, magnetic button, cursor follower) - Sequencing multi-step animations imperatively with
useAnimate - Building spinners, shimmer skeletons, pulse indicators, or loading button states
Outputs
This skill produces:
- Drag interactions: draggable cards, drag-to-dismiss sheets,
Reorder.Grouplists - Gesture hooks: swipe detection, long press, pinch outline
- Text animation components: word reveal, character typewriter, number counter
- SVG animation: path draw-on, icon morph, stroke progress ring
- Custom hooks:
useScrollReveal,useHoverScale,useNavigationDirection,useInViewOnce - Imperative sequences via
useAnimatewith interrupt-safeasync/await - Loader components: spinner, shimmer, pulse dot, progress bar, button loading state
Principles
- Physics-based motion (
useSpring,springs.*) always feels more natural than duration-based for direct manipulation. useMotionValue+useTransformcomputes derived values without triggering re-renders.useAnimatesequences are imperative and interrupt-safe — callinganimate()mid-flight cancels the previous animation automatically.- Motion values (
useMotionValue,useSpring) are SSR-safe and do not cause hydration errors.
Rules
- Drag interactions must be tested on touch devices, not just mouse.
dragprop works on both but feel and threshold differ. - Infinite animations must pause when
document.visibilityState === "hidden". Background tabs must not consume GPU/CPU. - Swipe threshold must be explicit. Never infer intent from velocity alone; combine
offset+velocitychecks. useAnimatescope ref must be attached to a mounted DOM element. Callinganimate()before mount throws silently.- Motion values must not be recreated on render.
useMotionValue(0)inside a component body is correct;new MotionValue(0)in a render is not. - All token values are imported from
motion-foundations. No inline numbers. - Custom hooks must handle cleanup. Every
window.addEventListenerneeds a matchingremoveEventListenerin theuseEffectreturn. - SVG morphing requires equal path command counts. Paths with different command structures snap instead of interpolating.
Decision Guidance
Choosing the right advanced API
| Scenario | API |
|---|---|
| Drag with physics on release | drag + dragTransition: springs.release |
| Ordered drag-to-reorder list | Reorder.Group + Reorder.Item |
| Dismiss on drag offset | drag="y" + onDragEnd offset check |
| Swipe left/right | drag="x" + onDragEnd offset check |
| Long press | useLongPress hook |
| Value smoothed over time | useSpring |
| Value derived from another | useTransform |
| Multi-step sequence | useAnimate with async/await |
| One-shot imperative animation | animate() from motion |
| Text entering word by word | Stagger on inline-block spans |
| SVG drawing on | pathLength 0 → 1 |
| SVG morph | d attribute tween (equal commands) |
| Circular progress | strokeDashoffset tween |
When to use useSpring vs a spring transition
useSpring |
transition: springs.* |
|
|---|---|---|
| Use for | Cursor follower, pointer-tracked values | Discrete state changes |
| Updates | Continuous, on every frame | Triggered by state change |
| Interrupt | Smooth — physics picks up from velocity | Restarts from current value |
Core Concepts
useMotionValue + useTransform
Reactive computation without re-renders:
const x = useMotionValue(0)
const opacity = useTransform(x, [-200, 0, 200], [0, 1, 0])
// opacity updates every frame as x changes — no setState, no re-render
useAnimate
Returns [scope, animate]. The scope ref must be attached to a DOM element.
animate() calls are interrupt-safe — calling mid-flight cancels the previous run.
const [scope, animate] = useAnimate()
…
자주 묻는 질문
이것을 사용하려면 전문 프로그래머여야 하나요?
전문가일 필요는 없지만, React나 Next.js에 대한 기본 지식이 있으면 좋습니다. 이 도구는 해당 환경을 위한 추가 기능이기 때문입니다.
모든 웹사이트에서 작동하나요?
이 도구는 React나 Next.js 웹 개발 라이브러리를 사용하는 프로젝트에 특화되어 있습니다.
현실 세계처럼 물리적인 느낌의 애니메이션도 만들 수 있나요?
네. 이 도구는 물리 원리에 기반한 애니메이션을 만들 수 있어, 특히 드래그 앤 드롭 같은 상호작용에서 더 자연스럽고 사실적인 움직임을 만듭니다.
상세 정보
작성자의 원본 설명
Advanced motion patterns for React / Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loaders, and the full API decision tree. Requires motion-foundations. Use when building drag and drop, gestures, text or SVG animation, or imperative animation sequences in React or Next.js.
repo: affaan-m/ECC
인기도
- GitHub 스타
- 280k
- 순위
- #211
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
accessibility
280k에이전트가 모든 사람이 쓸 수 있는 인터페이스를 만들도록 돕습니다. 시각 장애나 운동 장애가 있는 사람도 쓸 수 있게 합니다.
agent-architecture-audit
280k에이전트가 모든 것이 올바르게 작동하는지 점검하도록 돕습니다. AI 시스템의 문제를 찾아 고쳐서 기대대로 작동하게 합니다.
agent-eval
280k에이전트가 서로 다른 AI 코딩 도구를 비교하도록 돕습니다. 특정 작업에서 어느 도구가 더 빠르고, 저렴하고, 믿을 만한지 측정합니다.
agent-harness-construction
280k에이전트가 작업을 더 잘 이해하도록 돕습니다. 에이전트가 쓰는 도구와 지시문을 최적화해 성공 가능성을 높입니다.
비슷한 스킬
canvas
394k에이전트가 연결된 Mac 패널에 호스팅된 시각적 위젯을 띄우고, 패널을 숨기거나 다른 페이지로 옮기도록 돕습니다.
control-ui
394k에이전트가 세션, 대시보드, 연결된 Gateway를 포함해 OpenClaw Control UI를 정리하고 문제를 해결하도록 돕습니다.
diagram-maker
394k에이전트가 프로세스, 시스템 구조, 화이트보드 스케치를 위해 SVG, HTML, 편집 가능한 Excalidraw 파일로 명확한 다이어그램을 만들도록 돕습니다.