Communitygithub.com

NeverSight/learn-skills.dev

Motion 라이브러리를 사용한 애니메이션 구현. 모션, 전환, 제스처, 스크롤 효과 또는 인터랙티브 애니메이션을 컴포넌트에 추가할 때 사용합니다. 개념적인 논의가 아닌 구현 요청에 의해 트리거됩니다.

learn-skills.dev란 무엇인가요?

이 스킬은 Motion 라이브러리(motion.dev)를 활용하여 React 컴포넌트에 다양한 애니메이션을 구현하는 방법을 제공합니다. 스프링 물리 기반의 자연스러운 모션, 드래그와 호버 같은 제스처 상호작용, 레이아웃 변환, 스크롤 연동 효과, 자식 요소 스태거링, Enter/Exit 애니메이션 등 핵심 패턴을 다룹니다. 특히 스프링 기반의 물리 애니메이션을 선호하며, 성능 최적화를 위해 GPU 가속이 적용되는 transform과 opacity 속성 사용을 권장합니다. 또한 prefers-reduced-motion 설정을 자동으로 존중하여 접근성을 보장합니다. 이 스킬은 React에 최적화되어 있지만, Motion 라이브러리 자체는 다양한 플랫폼을 지원하며 TypeScript와 완벽하게 호환됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/NeverSight/learn-skills.dev/tree/HEAD/data/skills-md/adrsource/adr-source-v2/animation

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Motion을 사용한 애니메이션 구현

모든 애니메이션 작업에는 Motion 라이브러리(https://motion.dev)를 사용하세요.

빠른 시작

React (기본):

import { motion } from "motion/react"

// 기본 애니메이션
<motion.div animate={{ opacity: 1, y: 0 }} />

// 전환 설정 포함
<motion.div
  animate={{ x: 100 }}
  transition={{ type: "spring", stiffness: 100 }}
/>

핵심 패턴

1. 스프링 물리 (권장)

<motion.div
  animate={{ scale: 1 }}
  transition={{
    type: 'spring',
    stiffness: 260,
    damping: 20,
  }}
/>

스프링 프리셋:

  • 부드러운: stiffness: 120, damping: 14
  • 흔들리는: stiffness: 180, damping: 12
  • 딱딱한: stiffness: 300, damping: 20

2. 제스처 상호작용

<motion.div
  whileHover={{ scale: 1.05 }}
  whileTap={{ scale: 0.95 }}
  drag="x"
  dragConstraints={{ left: -100, right: 100 }}
/>

3. 레이아웃 애니메이션

<motion.div layout>{/* 위치/크기가 변경되는 콘텐츠 */}</motion.div>

4. 스크롤 연동 효과

import { useScroll, useTransform } from "motion/react"

const { scrollYProgress } = useScroll()
const opacity = useTransform(scrollYProgress, [0, 1], [1, 0])

<motion.div style={{ opacity }} />

5. 자식 요소 스태거링

<motion.ul
  variants={{
    visible: { transition: { staggerChildren: 0.07 } },
  }}
>
  {items.map((item) => (
    <motion.li
      key={item}
      variants={{
        hidden: { opacity: 0, y: 20 },
        visible: { opacity: 1, y: 0 },
      }}
    />
  ))}
</motion.ul>

6. Enter/Exit 애니메이션

import { AnimatePresence } from 'motion/react';

<AnimatePresence>
  {show && <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} />}
</AnimatePresence>;

애니메이션 속성

Transform (GPU 가속, 성능 우수):

  • x, y, z - 이동
  • scale, scaleX, scaleY - 크기 조절
  • rotate, rotateX, rotateY, rotateZ - 회전
  • skew, skewX, skewY - 기울이기

시각적 (신중하게 사용, 성능에 영향 가능):

  • opacity
  • background, backgroundColor
  • color
  • borderRadius

SVG 전용:

  • pathLength - 경로 그리기 애니메이션용
  • pathOffset - 경로 오프셋
  • pathSpacing - 대시 간격

접근성

항상 사용자 선호도를 존중하세요:

<motion.div
  animate={{ x: 100 }}
  transition={{
    type: 'spring',
    // 사용자가 동작 줄이기를 선호하는 경우 애니메이션 비활성화
    duration: 0,
  }}
/>

Motion은 prefers-reduced-motion을 자동으로 처리합니다. 스프링은 즉시 전환됩니다.

성능 팁

  1. 가능하면 transform/opacity만 애니메이트 (GPU 가속)
  2. layout prop 사용 (수동으로 width/height 애니메이트 대신)
  3. 스크롤 중에는 가급적 애니메이션 피하기
  4. 복잡한 애니메이션에는 will-change: transform 사용 (Motion이 처리)
  5. 동시 애니메이션 제한 - 한 번에 모두 실행하지 않고 스태거링

디자인 원칙 (간략)

애니메이션 적용 시점

  • 상태 전환 (로딩 → 성공)
  • 공간 변화 (뷰 진입/퇴장)
  • 주의 환기 (아껴서 사용)
  • 사용자 동작 확인

애니메이션을 적용하지 말아야 할 때

  • 첫 발생 이후 반복되는 동작
  • 성능이 중요한 경로
  • 사용자 제어 스크롤
  • 모든 단일 상호작용 (절제가 중요)

타이밍 가이드라인

  • 마이크로 상호작용: 150-250ms
  • 패널/모달 전환: 200-300ms
  • 페이지 전환: 300-500ms
  • 스프링: 물리적 특성이 지속 시간 결정

스프링 vs 지속 시간

  • 스프링 사용처: 인터랙티브 요소, 제스처, 레이아웃 변경
  • 지속 시간 사용처: 의도적인 시퀀스, 안무, 로더

자세한 애니메이션 철학은 principles.md를 참조하세요.

일반 패턴

로딩 상태:

<motion.div
  animate={{ rotate: 360 }}
  transition={{
    repeat: Infinity,
    duration: 1,
    ease: 'linear',
  }}
/>

토스트 알림:

<motion.div
  initial={{ x: 400, opacity: 0 }}
  animate={{ x: 0, opacity: 1 }}
  exit={{ x: 400, opacity: 0 }}
  transition={{ type: 'spring', stiffness: 300, damping: 30 }}
/>

드로어:

<motion.div
  initial={{ x: '-100%' }}
  animate={{ x: 0 }}
  exit={{ x: '-100%' }}
  transition={{ type: 'spring', damping: 25 }}
/>

아코디언:

<motion.div
  animate={{ height: isOpen ? 'auto' : 0 }}
  transition={{ type: 'spring', bounce: 0 }}
  style={{ overflow: 'hidden' }}
/>

리소스

빠른 문제 해결

애니메이션이 실행되지 않나요?

  • 요소가 조건부로 렌더링되는지 확인 (AnimatePresence 사용)
  • 대상 값이 초기 값과 다른지 확인
  • CSS가 오버라이드하는지 확인 (예: !important)

성능 문제가 있나요?

  • transform과 opacity만 사용
  • layout prop을 사용하여 차원 애니메이션 대체
  • 브라우저 DevTools Performance 탭 확인

레이아웃 애니메이션이 깜빡이나요?

  • 부모에 position: relative가 있는지 확인
  • 필요한 경우 부모와 자식 모두에 layout 추가
  • 충돌하는 CSS 전환 확인

참고 사항

  • Motion은 MIT 라이선스, 프로덕션 준비 완료
  • 하이브리드 엔진: 120fps, GPU 가속
  • TypeScript 지원 내장
  • 트리 쉐이킹 가능으로 최적 번들 크기
  • React 18+ (Suspense 포함)와 호환

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

NeverSight/learn-skills.dev

Use when generating or modifying Remotion video code, creating demo videos, or working with the demo-video/ directory

NeverSight/learn-skills.dev

Create AI avatar and talking head videos via inference.sh CLI. Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS). Also: OmniHuman, Fabric, PixVerse. Audio: Inworld TTS-2 (100+ languages, emotion steering for characters), ElevenLabs, Kokoro. Capabilities: audio-driven avatars, text-to-avatar, lipsync videos, talking head generation, virtual presenters, UGC content. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos, UGC ads, gaming avatars, NPC dialogue. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human, ugc, ugc video, ugc ad, avatar ugc

NeverSight/learn-skills.dev

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video

NeverSight/learn-skills.dev

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

NeverSight/learn-skills.dev

ElevenLabs automatic dubbing - translate and dub audio/video into 29 languages while preserving speaker voice via inference.sh CLI. Capabilities: auto speaker detection, voice-preserving translation, video dubbing, audio localization. Use for: content localization, video translation, multilingual content, international distribution. Triggers: dubbing, dub video, translate audio, video translation, audio translation, localize content, elevenlabs dubbing, eleven labs dub, multilingual dub, voice translation, auto dub, language dub, content localization

NeverSight/learn-skills.dev

Explainer video production guide: scripting, voiceover, visuals, and assembly. Covers script formulas, pacing rules, scene planning, and multi-tool pipelines. Use for: product demos, how-it-works videos, onboarding videos, social explainers. Triggers: explainer video, how to make explainer, product video, demo video, video production, video script, animated explainer, product demo video, tutorial video, onboarding video, walkthrough video, video pipeline

NeverSight/learn-skills.dev

Still-to-video conversion guide: model selection, motion prompting, and camera movement. Covers Wan 2.5 i2v, Seedance, Fabric, Grok Video with when to use each. Use for: animating images, creating video from stills, adding motion, product animations. Triggers: image to video, i2v, animate image, still to video, add motion to image, image animation, photo to video, animate still, wan i2v, image2video, bring image to life, animate photo, motion from image

NeverSight/learn-skills.dev

Generate talking head avatar videos with Pruna P-Video-Avatar via inference.sh CLI. Turn a portrait image into a realistic speaking video with built-in TTS. 18x faster and 6x cheaper than competitors. Models: P-Video-Avatar, P-Image (for portrait generation). Capabilities: text-to-avatar, audio-driven avatars, 30 voices, 10 languages, 720p/1080p, built-in TTS, dynamic backgrounds, full-body control. Use for: AI presenters, product demos, explainer videos, virtual influencers, marketing, education, multilingual content, UGC, gaming avatars. Triggers: avatar video, talking head, ai avatar, p-video-avatar, pruna avatar, video avatar, ai presenter, digital human, virtual presenter, lipsync, talking avatar, ai spokesperson, heygen alternative, synthesia alternative, veed alternative, fabric alternative, omnihuman alternative

NeverSight/learn-skills.dev

Generate videos with Pruna P-Video and WAN models via inference.sh CLI. Models: P-Video, WAN-T2V, WAN-I2V. Capabilities: text-to-video, image-to-video, audio support, 720p/1080p, fast inference. Pruna optimizes models for speed without quality loss. Triggers: pruna video, p-video, pruna ai video, fast video generation, optimized video, wan t2v, wan i2v, economic video generation, cheap video generation, pruna text to video, pruna image to video

NeverSight/learn-skills.dev

Render videos from React/Remotion component code via inference.sh. Pass TSX code, get MP4. Supports all Remotion APIs: useCurrentFrame, useVideoConfig, spring, interpolate, AbsoluteFill, Sequence. Configurable resolution, FPS, duration, codec. Use for: programmatic video generation, animated graphics, motion design, data-driven videos, React animations to video. Triggers: remotion, render video from code, tsx to video, react video, programmatic video, remotion render, code to video, animated video, motion graphics code, react animation video

NeverSight/learn-skills.dev

Video ad creation with exact platform-specific specs for TikTok, Instagram, YouTube, Facebook, LinkedIn. Covers dimensions, duration limits, AIDA framework, and caption requirements. Use for: video ads, social media ads, paid media creative, video marketing, ad production. Triggers: video ad, social media ad, tiktok ad, instagram ad, youtube ad, facebook ad, linkedin ad, video creative, ad specs, paid media, video marketing, ad production, reels ad, stories ad, pre roll, bumper ad

NeverSight/learn-skills.dev

Best practices and techniques for writing effective AI video generation prompts. Covers: Veo, Seedance, Wan, Grok, Kling, Runway, Pika, Sora prompting strategies. Learn: shot types, camera movements, lighting, pacing, style keywords, negative prompts. Use for: improving video quality, getting consistent results, professional video prompts. Triggers: video prompt, how to prompt video, veo prompts, video generation tips, better ai video, video prompt engineering, video prompt guide, video prompt template, ai video tips, video prompt best practices, video prompt examples, cinematography prompts

NeverSight/learn-skills.dev

YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A/B testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image

NeverSight/learn-skills.dev

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

NeverSight/learn-skills.dev

Configure and use the hosted YouTube Data MCP end-to-end with minimal user input. Use when users want the agent to verify Node.js and `npx`, configure MCP server config (Windows/macOS, Cursor/Codex/OpenClaw/OpenCode), request API key at setup time, run post-install capability discovery (`tools/list` and `get_patch_notes`), and then strongly recommend helper skill and Python setup for full local document and spreadsheet workflows.

NeverSight/learn-skills.dev

Creates 120fps GPU-accelerated animations with Motion.dev (Framer Motion successor) for React, Next.js, Svelte, and Astro projects. Use when user requests animation, motion, scroll effects, parallax, hero animations, gestures, drag interactions, spring physics, whileHover effects, whileInView animations, animated UI, micro-interactions, page transitions, or layout animations. Generates production TypeScript/JSX code with accessibility (prefers-reduced-motion) and performance validation (≥60fps). Supports entrance animations, gesture interactions (hover/tap/drag), scroll-based reveals, and layout transitions using spring physics and natural timing. Do NOT use for CSS-only transitions (use native CSS), static sites without JavaScript, Vue animations (use motion-v variant instead), or SVG/Canvas complex animations (GSAP better suited).

NeverSight/learn-skills.dev

Static artifact craft skill for self-contained HTML/CSS/JS documents: docs, sheets, dashboards, explainers, slides, tools, and landing pages. Use when the user asks for a durable, openable, shareable web deliverable they'll keep or hand off — a report, a dashboard, a slide deck, a data table, a page. Local folder first, temporary public link via tunnel (localhost.run), optional durable publish to Surge, GitHub Pages, or Cloudflare. Not for quick look renders, inline snippets, or throwaway scratch. Not for SPA frameworks, backend APIs, database apps, or production product UI.

NeverSight/learn-skills.dev

FFmpeg commands for video/audio conversion, trimming, compression, and processing. Use when user mentions "ffmpeg", "convert video", "compress video", "extract audio", "trim video", "gif from video", "video codec", "transcode", "screen recording", "merge videos", "video to mp4", "reduce file size", or any media processing task.

NeverSight/learn-skills.dev

Vim keybindings, motions, text objects, and operators for efficient text editing. Use when user asks about "vim commands", "vim motions", "text objects", "vim keybindings", "vim cheat sheet", "learn vim", "vim in VS Code", or any Vim editing tasks.

NeverSight/learn-skills.dev

Grok Build ONLY. Turn a 2D character still into smooth animation sprites via image_gen/image_edit base → image_to_video (6s/10s run-in-place) → ffmpeg frames → magenta chroma-key → dense sampled sprites (strip/grid/GIF). Use when the user wants video-to-sprite, motion capture from generated video, smoother run/walk cycles from dense frames, or runs /video2dsprite. Do NOT use on Codex/Claude — only Grok Build has image_to_video. Prefer generate2dsprite for crisp pixel sheets without video.

관련 스킬