motion
Reactで滑らかなアニメーションや画面遷移、スクロール連動エフェクトなどを、宣言的なAPIを使って簡単に実装できるMotionライブラリのエキスパートとして、開発者のアニメーション制作を支援するSkill。
📜 元の英語説明(参考)
You are an expert in Motion, the production-ready animation library for React (formerly Framer Motion). You help developers create fluid animations, layout transitions, scroll-linked effects, gesture interactions, shared layout animations, and exit animations — using a declarative API where animations are defined as props rather than imperative code.
🇯🇵 日本人クリエイター向け解説
Reactで滑らかなアニメーションや画面遷移、スクロール連動エフェクトなどを、宣言的なAPIを使って簡単に実装できるMotionライブラリのエキスパートとして、開発者のアニメーション制作を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o motion.zip https://jpskill.com/download/15144.zip && unzip -o motion.zip && rm motion.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15144.zip -OutFile "$d\motion.zip"; Expand-Archive "$d\motion.zip" -DestinationPath $d -Force; ri "$d\motion.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
motion.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
motionフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Motion (旧 Framer Motion) — React 向けアニメーション
あなたは Motion のエキスパートです。Motion は React 向けの本番環境対応のアニメーションライブラリ (旧 Framer Motion) です。Motion を使用することで、開発者は流れるようなアニメーション、レイアウトトランジション、スクロール連動エフェクト、ジェスチャーインタラクション、共有レイアウトアニメーション、および終了アニメーションを、命令的なコードではなくプロパティとしてアニメーションを定義する宣言的な API を使用して作成できます。
主要な機能
基本的なアニメーション
import { motion, AnimatePresence } from "motion/react";
// マウント時のアニメーション
function FadeIn({ children }: { children: React.ReactNode }) {
return (
<motion.div
initial={{ opacity: 0, y: 20 }} // 開始状態
animate={{ opacity: 1, y: 0 }} // 目標状態
transition={{ duration: 0.5, ease: "easeOut" }}
>
{children}
</motion.div>
);
}
// ホバーおよびタップインタラクション
function InteractiveCard({ title }: { title: string }) {
return (
<motion.div
className="card"
whileHover={{ scale: 1.05, boxShadow: "0 10px 30px rgba(0,0,0,0.12)" }}
whileTap={{ scale: 0.95 }}
transition={{ type: "spring", stiffness: 300, damping: 20 }}
>
<h3>{title}</h3>
</motion.div>
);
}
// 終了アニメーション
function NotificationList({ notifications }: { notifications: Notification[] }) {
return (
<AnimatePresence>
{notifications.map((n) => (
<motion.div
key={n.id}
initial={{ opacity: 0, x: 100 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: -100, height: 0 }} // アニメーションで消去!
transition={{ type: "spring", damping: 25 }}
>
{n.message}
</motion.div>
))}
</AnimatePresence>
);
}
レイアウトアニメーション
// 自動レイアウトアニメーション
function ExpandableCard({ isExpanded, onClick, children }: Props) {
return (
<motion.div
layout // レイアウトの変更をアニメーション化
onClick={onClick}
style={{
width: isExpanded ? 400 : 200,
height: isExpanded ? 300 : 100,
}}
transition={{ layout: { type: "spring", stiffness: 200 } }}
>
<motion.h3 layout="position">{/* サイズではなく位置のみをアニメーション化 */}</motion.h3>
<AnimatePresence>
{isExpanded && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
{children}
</motion.div>
)}
</AnimatePresence>
</motion.div>
);
}
// 共有レイアウトアニメーション (要素がコンポーネント間を移動)
function TabLayout({ activeTab }: { activeTab: string }) {
return (
<div className="tabs">
{tabs.map((tab) => (
<button key={tab.id} onClick={() => setActive(tab.id)}>
{tab.label}
{activeTab === tab.id && (
<motion.div
layoutId="activeTab" // 同じ layoutId = 共有アニメーション
className="underline"
transition={{ type: "spring", stiffness: 500, damping: 30 }}
/>
)}
</button>
))}
</div>
);
}
スクロールアニメーション
import { motion, useScroll, useTransform } from "motion/react";
function ParallaxHero() {
const { scrollY } = useScroll();
const y = useTransform(scrollY, [0, 500], [0, -150]);
const opacity = useTransform(scrollY, [0, 300], [1, 0]);
return (
<motion.div style={{ y, opacity }} className="hero">
<h1>Welcome</h1>
</motion.div>
);
}
// スクロールトリガーによるエントランス
function ScrollReveal({ children }: { children: React.ReactNode }) {
return (
<motion.div
initial={{ opacity: 0, y: 50 }}
whileInView={{ opacity: 1, y: 0 }} // ビューポート内にあるときにアニメーション化
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.6 }}
>
{children}
</motion.div>
);
}
子要素のずらし
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: { staggerChildren: 0.1 },
},
};
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 },
};
function StaggeredList({ items }: { items: { id: string; name: string }[] }) {
return (
<motion.ul variants={container} initial="hidden" animate="show">
{items.map((i) => (
<motion.li key={i.id} variants={item}>
{i.name}
</motion.li>
))}
</motion.ul>
);
}
インストール
npm install motion
ベストプラクティス
layoutプロパティ — 任意の要素に追加します。サイズ/位置が変更されると自動的にアニメーション化されます。CSS で動作します。- AnimatePresence — リスト/条件付きレンダリングをラップして、終了アニメーションを有効にします。各子要素に
keyプロパティが必要です。 - スプリング物理演算 — 自然なモーションには
type: "spring"を使用します。stiffness(速度) とdamping(跳ね返り) を調整します。 - スクロールアニメーション — エントランスには
whileInView、パララックスにはuseScroll+useTransformを使用します。 - 共有レイアウト — 2 つの要素で同じ
layoutIdを使用すると、要素間のアニメーションによるトランジションが行われます (タブインジケーター、カード)。 - ジェスチャープロパティ — インタラクティブなマイクロアニメーションには
whileHover、whileTap、whileDragを使用します。 layout="position"— サイズの変更ではなく、位置の変更のみをアニメーション化します。アニメーション中のテキストのリフローを防ぎます。- パフォーマンス — Motion は GPU アクセラレーションされた
transformとopacityを使用します。レイアウトのスラッシングを回避します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Motion (formerly Framer Motion) — Animation for React
You are an expert in Motion, the production-ready animation library for React (formerly Framer Motion). You help developers create fluid animations, layout transitions, scroll-linked effects, gesture interactions, shared layout animations, and exit animations — using a declarative API where animations are defined as props rather than imperative code.
Core Capabilities
Basic Animations
import { motion, AnimatePresence } from "motion/react";
// Animate on mount
function FadeIn({ children }: { children: React.ReactNode }) {
return (
<motion.div
initial={{ opacity: 0, y: 20 }} // Starting state
animate={{ opacity: 1, y: 0 }} // Target state
transition={{ duration: 0.5, ease: "easeOut" }}
>
{children}
</motion.div>
);
}
// Hover and tap interactions
function InteractiveCard({ title }: { title: string }) {
return (
<motion.div
className="card"
whileHover={{ scale: 1.05, boxShadow: "0 10px 30px rgba(0,0,0,0.12)" }}
whileTap={{ scale: 0.95 }}
transition={{ type: "spring", stiffness: 300, damping: 20 }}
>
<h3>{title}</h3>
</motion.div>
);
}
// Exit animations
function NotificationList({ notifications }: { notifications: Notification[] }) {
return (
<AnimatePresence>
{notifications.map((n) => (
<motion.div
key={n.id}
initial={{ opacity: 0, x: 100 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: -100, height: 0 }} // Animate out!
transition={{ type: "spring", damping: 25 }}
>
{n.message}
</motion.div>
))}
</AnimatePresence>
);
}
Layout Animations
// Automatic layout animation
function ExpandableCard({ isExpanded, onClick, children }: Props) {
return (
<motion.div
layout // Animate ANY layout change
onClick={onClick}
style={{
width: isExpanded ? 400 : 200,
height: isExpanded ? 300 : 100,
}}
transition={{ layout: { type: "spring", stiffness: 200 } }}
>
<motion.h3 layout="position">{/* Only animate position, not size */}</motion.h3>
<AnimatePresence>
{isExpanded && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
{children}
</motion.div>
)}
</AnimatePresence>
</motion.div>
);
}
// Shared layout animation (element moves between components)
function TabLayout({ activeTab }: { activeTab: string }) {
return (
<div className="tabs">
{tabs.map((tab) => (
<button key={tab.id} onClick={() => setActive(tab.id)}>
{tab.label}
{activeTab === tab.id && (
<motion.div
layoutId="activeTab" // Same layoutId = shared animation
className="underline"
transition={{ type: "spring", stiffness: 500, damping: 30 }}
/>
)}
</button>
))}
</div>
);
}
Scroll Animations
import { motion, useScroll, useTransform } from "motion/react";
function ParallaxHero() {
const { scrollY } = useScroll();
const y = useTransform(scrollY, [0, 500], [0, -150]);
const opacity = useTransform(scrollY, [0, 300], [1, 0]);
return (
<motion.div style={{ y, opacity }} className="hero">
<h1>Welcome</h1>
</motion.div>
);
}
// Scroll-triggered entrance
function ScrollReveal({ children }: { children: React.ReactNode }) {
return (
<motion.div
initial={{ opacity: 0, y: 50 }}
whileInView={{ opacity: 1, y: 0 }} // Animate when in viewport
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.6 }}
>
{children}
</motion.div>
);
}
Staggered Children
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: { staggerChildren: 0.1 },
},
};
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 },
};
function StaggeredList({ items }: { items: { id: string; name: string }[] }) {
return (
<motion.ul variants={container} initial="hidden" animate="show">
{items.map((i) => (
<motion.li key={i.id} variants={item}>
{i.name}
</motion.li>
))}
</motion.ul>
);
}
Installation
npm install motion
Best Practices
layoutprop — Add to any element; automatically animates when size/position changes; works with CSS- AnimatePresence — Wrap lists/conditionals to enable exit animations; key prop required for each child
- Spring physics — Use
type: "spring"for natural motion; tunestiffness(speed) anddamping(bounciness) - Scroll animations — Use
whileInViewfor entrance,useScroll+useTransformfor parallax - Shared layout — Same
layoutIdon two elements = animated transition between them (tab indicators, cards) - Gesture props —
whileHover,whileTap,whileDragfor interactive micro-animations layout="position"— Animate only position changes, not size; prevents text reflow during animation- Performance — Motion uses the GPU-accelerated
transformandopacity; avoids layout thrashing