Communitygithub.com

Framer Motion 스킬

React 및 Next.js 애플리케이션에 애니메이션을 추가할 때 사용할 수 있는 종합적인 Framer Motion 애니메이션 라이브러리입니다. 모션 컴포넌트, Variants, 제스처, 페이지 전환, 스크롤 애니메이션을 다룹니다.

Framer Motion 스킬란 무엇인가요?

이 스킬은 Framer Motion을 사용하여 React/Next.js 애플리케이션에 프로덕션 수준의 애니메이션을 구현하는 방법을 제공합니다. 핵심 개념으로 `motion` 컴포넌트를 통한 기본 애니메이션, variants를 활용한 코드 정리 및 자식 요소 스태거링, whileHover/whileTap과 같은 제스처, AnimatePresence를 통한 exit 애니메이션, whileInView를 통한 스크롤 트리거, drag 및 layout 애니메이션을 지원합니다. 또한 spring, tween, inertia 등 다양한 전환 유형과 built-in easing 함수, useReducedMotion 훅을 통한 접근성까지 고려합니다. 페이지 전환, 리스트 애니메이션, 모달, 아코디언 등 실무에서 자주 쓰이는 패턴의 템플릿과 예제 코드를 함께 제공하여 개발자가 즉시 활용할 수 있도록 구성되어 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/asmayaseen/framer-motion

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

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

문서

Framer Motion 스킬은(는) 무엇을 하나요?

React 애플리케이션을 위한 프로덕션 준비 애니메이션.

빠른 시작

설치

npm install framer-motion
# 또는
pnpm add framer-motion

기본 사용법

import { motion } from "framer-motion";

// 간단한 애니메이션
<motion.div
  initial={{ opacity: 0 }}
  animate={{ opacity: 1 }}
  transition={{ duration: 0.5 }}
>
  콘텐츠
</motion.div>

핵심 개념

개념가이드
모션 컴포넌트reference/motion-component.md
Variantsreference/variants.md
제스처reference/gestures.md
훅reference/hooks.md

예제

패턴가이드
페이지 전환examples/page-transitions.md
리스트 애니메이션examples/list-animations.md
스크롤 애니메이션examples/scroll-animations.md
마이크로 인터랙션examples/micro-interactions.md

템플릿

템플릿목적
templates/page-transition.tsx페이지 전환 래퍼
templates/animated-list.tsx애니메이션 리스트 컴포넌트

빠른 참조

기본 애니메이션

<motion.div
  initial={{ opacity: 0, y: 20 }}
  animate={{ opacity: 1, y: 0 }}
  exit={{ opacity: 0, y: -20 }}
  transition={{ duration: 0.3 }}
>
  콘텐츠
</motion.div>

호버 및 탭

<motion.button
  whileHover={{ scale: 1.05 }}
  whileTap={{ scale: 0.95 }}
  transition={{ type: "spring", stiffness: 400, damping: 17 }}
>
  클릭하세요
</motion.button>

Variants

const container = {
  hidden: { opacity: 0 },
  show: {
    opacity: 1,
    transition: { staggerChildren: 0.1 }
  }
};

const item = {
  hidden: { opacity: 0, y: 20 },
  show: { opacity: 1, y: 0 }
};

<motion.ul variants={container} initial="hidden" animate="show">
  {items.map(i => (
    <motion.li key={i} variants={item}>{i}</motion.li>
  ))}
</motion.ul>

AnimatePresence (종료 애니메이션)

import { AnimatePresence, motion } from "framer-motion";

<AnimatePresence mode="wait">
  {isVisible && (
    <motion.div
      key="modal"
      initial={{ opacity: 0 }}
      animate={{ opacity: 1 }}
      exit={{ opacity: 0 }}
    >
      모달 콘텐츠
    </motion.div>
  )}
</AnimatePresence>

스크롤 트리거

<motion.div
  initial={{ opacity: 0, y: 50 }}
  whileInView={{ opacity: 1, y: 0 }}
  viewport={{ once: true, margin: "-100px" }}
  transition={{ duration: 0.5 }}
>
  스크롤되어 보일 때 애니메이션 실행
</motion.div>

드래그

<motion.div
  drag
  dragConstraints={{ left: -100, right: 100, top: -100, bottom: 100 }}
  dragElastic={0.1}
>
  드래그하세요
</motion.div>

레이아웃 애니메이션

<motion.div layout layoutId="shared-element">
  레이아웃이 변경될 때 애니메이션되는 콘텐츠
</motion.div>

전환 유형

// Tween (기본값)
transition={{ duration: 0.3, ease: "easeOut" }}

// Spring
transition={{ type: "spring", stiffness: 300, damping: 20 }}

// Spring 프리셋
transition={{ type: "spring", bounce: 0.25 }}

// Inertia (드래그용)
transition={{ type: "inertia", velocity: 50 }}

이징 함수

// 내장 이징
ease: "linear"
ease: "easeIn"
ease: "easeOut"
ease: "easeInOut"
ease: "circIn"
ease: "circOut"
ease: "circInOut"
ease: "backIn"
ease: "backOut"
ease: "backInOut"

// 사용자 정의 cubic-bezier
ease: [0.17, 0.67, 0.83, 0.67]

축소된 움직임 (Reduced Motion)

사용자 설정을 항상 존중하세요:

import { motion, useReducedMotion } from "framer-motion";

function Component() {
  const prefersReducedMotion = useReducedMotion();

  return (
    <motion.div
      initial={{ opacity: 0, y: prefersReducedMotion ? 0 : 20 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: prefersReducedMotion ? 0 : 0.3 }}
    >
      모션 선호도 존중
    </motion.div>
  );
}

// 또는 미디어 쿼리 사용
const variants = {
  initial: { opacity: 0 },
  animate: { opacity: 1 },
};

<motion.div
  variants={variants}
  initial="initial"
  animate="animate"
  className="motion-reduce:transition-none"
>

일반 패턴

페이드 인 업

const fadeInUp = {
  initial: { opacity: 0, y: 20 },
  animate: { opacity: 1, y: 0 },
  transition: { duration: 0.4 }
};

<motion.div {...fadeInUp}>콘텐츠</motion.div>

스태거드 리스트

const container = {
  hidden: { opacity: 0 },
  show: {
    opacity: 1,
    transition: { staggerChildren: 0.1, delayChildren: 0.2 }
  }
};

const item = {
  hidden: { opacity: 0, x: -20 },
  show: { opacity: 1, x: 0 }
};

모달

<AnimatePresence>
  {isOpen && (
    <>
      {/* 배경 */}
      <motion.div
        initial={{ opacity: 0 }}
        animate={{ opacity: 1 }}
        exit={{ opacity: 0 }}
        className="fixed inset-0 bg-black/50"
        onClick={onClose}
      />
      {/* 모달 */}
      <motion.div
        initial={{ opacity: 0, scale: 0.95 }}
        animate={{ opacity: 1, scale: 1 }}
        exit={{ opacity: 0, scale: 0.95 }}
        className="fixed inset-x-4 top-1/2 -translate-y-1/2 ..."
      >
        모달 콘텐츠
      </motion.div>
    </>
  )}
</AnimatePresence>

아코디언

<motion.div
  initial={false}
  animate={{ height: isOpen ? "auto" : 0 }}
  transition={{ duration: 0.3, ease: "easeInOut" }}
  className="overflow-hidden"
>
  <div className="p-4">아코디언 콘텐츠</div>
</motion.div>

모범 사례

  1. variants 사용: 코드가 깔끔해지고 오케스트레이션이 쉬워집니다.
  2. 축소된 움직임 존중: 항상 useReducedMotion을 확인하세요.
  3. layout은 필요한 경우에만 사용: 성능 비용이 들 수 있으므로 꼭 필요할 때만 사용하세요.
  4. 종료 애니메이션: AnimatePresence로 감싸세요.
  5. 인터랙션에는 Spring 사용: 호버/탭에 더 자연스러운 느낌을 줍니다.
  6. 페이지 전환에는 Tween 사용: 더 예측 가능한 타이밍을 제공합니다.
  7. GPU 가속 속성: width, height보다 opacity, scale, x, y를 선호하세요.

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬