mcpField
C
css-native

css-native

github.com/dylantarreデザイン・UI134722 回インストール43 週間前に更新
リポジトリ

css-native について

css-nativeは、CSSで画面の動きを作るデザイナーや開発者向けのガイドです。ディズニーの12のアニメーション原則をCSSのプロパティや例に対応させ、時間の目安も示します。

主な機能

  1. 0112のアニメーション原則をCSSに適用
  2. 02キーフレームとトランジションの例
  3. 03変形とモーションパスを解説
  4. 04一般的なアニメーション時間の目安

活用シーン

  1. 01キャラクターのスクワッシュとストレッチを設計
  2. 02ボタンのホバーに副次的な動きを追加
  3. 03要素の移動に使うイージングと時間を計画

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/dylantarre/animation-principles --skill css-native

インストール後、Claude Code で/css-nativeを入力して読み込まれたか確認します。

詳細

CSS ネイティブアニメーションの原則

CSS アニメーション、トランジション、トランスフォームを使用して、ディズニーアニメーションの12の原則すべてを実装します。

1. スクワッシュ&ストレッチ

@keyframes squash-stretch {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  50% { transform: scaleX(1.2) scaleY(0.8); }
}
.ball { animation: squash-stretch 0.3s ease-in-out; }

2. 予備動作

@keyframes anticipate-jump {
  0% { transform: translateY(0); }
  20% { transform: translateY(10px) scaleY(0.9); } /* wind up */
  100% { transform: translateY(-100px); }
}

3. 演出

.hero { z-index: 10; filter: none; }
.background { z-index: 1; filter: blur(2px); opacity: 0.7; }

4. ストレート・アヘッド/ポーズ・トゥ・ポーズ

/* Pose to pose - define keyframes explicitly */
@keyframes walk-cycle {
  0% { background-position: 0 0; }
  25% { background-position: -100px 0; }
  50% { background-position: -200px 0; }
  75% { background-position: -300px 0; }
  100% { background-position: -400px 0; }
}

5. フォロースルーとオーバーラッピング・アクション

.character { animation: move 0.5s ease-out; }
.hair { animation: move 0.5s ease-out 0.05s; } /* slight delay */
.cape { animation: move 0.5s ease-out 0.1s; }

6. スローインとスローアウト

.element {
  transition: transform 0.4s cubic-bezier(0.42, 0, 0.58, 1);
}
/* Or use: ease-in-out, ease-in, ease-out */

7. アーク

@keyframes arc-motion {
  0% { transform: translate(0, 0); }
  50% { transform: translate(100px, -80px); }
  100% { transform: translate(200px, 0); }
}
/* Use offset-path for true arcs */
.element { offset-path: path('M0,100 Q100,0 200,100'); }

8. 副次的なアクション

.button:hover {
  transform: scale(1.05);
}
.button:hover .icon {
  animation: wiggle 0.3s ease-in-out;
}

9. タイミング

.fast { animation-duration: 0.15s; }
.normal { animation-duration: 0.3s; }
.slow { animation-duration: 0.6s; }
.dramatic { animation-duration: 1.2s; }

10. 誇張

@keyframes exaggerated-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-150px) scale(0.8, 1.3); }
}

11. 立体感のある描画

.element {
  transform-style: preserve-3d;
  perspective: 1000px;
}
.face { transform: rotateY(20deg); }

12. 魅力

.appealing {
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.appealing:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

タイミングの目安

アクション再生時間
マイクロインタラクション100-200ms
ボタンのフィードバック150-300ms
ページ遷移300-500ms
複雑なアニメーション500-1000ms

主な CSS プロパティ

  • animation / @keyframes
  • transition
  • transform
  • offset-path(モーションパス)
  • animation-timing-function
  • animation-delay

コメント