Web Motion Design

dylantarre/animation-principles/skills/01-by-domain/web-motion-design

作者 dylantarre83597134ba8f無授權條款99 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫9 個月前更新

Use when building CSS animations, JavaScript transitions, React/Vue motion, or any browser-based animation work.

僅含說明Design & Creative
AI 產生的概覽

將迪士尼十二項動畫原則套用到 CSS、JavaScript 與前端框架的動效設計。

功能
這項技能為瀏覽器動畫開發提供指引,把迪士尼十二項動畫原則逐條對應到具體的網頁實作方式,例如 transform 縮放、緩動曲線與錯開延遲。它提供速查表、逐條原則的應用說明、CSS 程式碼範例,以及只動畫 transform 與 opacity 的效能規則。產出的是指引內容,而非產生的檔案或指令碼。
適用情境
適合在製作 CSS 動畫、JavaScript 轉場,或 React、Vue 元件動效時使用。適用於微互動、下拉選單、頁面轉場等需要自然流暢且效能良好的介面動效。
執行需求
不需要指令碼或工具,僅為說明性內容。假定使用情境是採用 CSS、JavaScript、React 或 Vue 的前端專案。

Web Motion Design

Apply Disney's 12 animation principles to CSS, JavaScript, and frontend frameworks.

Quick Reference

PrincipleWeb Implementation
Squash & Stretchtransform: scale() on interaction states
AnticipationSlight reverse movement before action
StagingFocus user attention with motion hierarchy
Straight Ahead / Pose to PoseJS frame-by-frame vs CSS keyframes
Follow Through / OverlappingStaggered child animations, elastic easing
Slow In / Slow Outease-in-out, cubic-bezier curves
Arcmotion-path or bezier translate transforms
Secondary ActionShadows, glows responding to primary motion
TimingDuration: micro 100-200ms, standard 200-400ms
ExaggerationScale beyond 1.0, overshoot animations
Solid DrawingConsistent transform-origin, 3D perspective
AppealSmooth 60fps, purposeful motion design

Principle Applications

Squash & Stretch: Apply scaleY compression on button press, scaleX stretch on hover. Keep volume constant—if you compress Y, expand X slightly.

Anticipation: Before expanding a dropdown, shrink it 2-3% first. Before sliding content left, move it 5px right.

Staging: Dim background elements during modal focus. Use motion to direct eye flow—animate important elements first.

Straight Ahead vs Pose to Pose: Use CSS @keyframes for predictable, repeatable animations (pose to pose). Use JavaScript/GSAP for dynamic, physics-based motion (straight ahead).

Follow Through & Overlapping: Child elements should complete movement after parent stops. Use animation-delay with decreasing values for natural stagger.

Slow In / Slow Out: Never use linear for UI motion. Standard easing: cubic-bezier(0.4, 0, 0.2, 1). Enter: cubic-bezier(0, 0, 0.2, 1). Exit: cubic-bezier(0.4, 0, 1, 1).

Arc: Elements in nature move in arcs, not straight lines. Use offset-path or combine X/Y transforms with different easings.

Secondary Action: Button shadow grows/blurs on hover. Icon inside button rotates while button scales. Background particles respond to primary element.

Timing: Micro-interactions: 100-200ms. Standard transitions: 200-400ms. Complex sequences: 400-700ms. Page transitions: 300-500ms.

Exaggeration: Hover states scale to 1.05-1.1, not 1.01. Error shakes move 10-20px, not 2px. Make motion noticeable but not jarring.

Solid Drawing: Maintain consistent transform-origin. Use perspective for 3D depth. Avoid conflicting transforms that create visual glitches.

Appeal: Target 60fps—use transform and opacity only when possible. Add subtle personality through custom easing curves. Motion should feel intentional.

Code Patterns

css
/* Elastic button with squash/stretch */.button:active {  transform: scale(0.95, 1.05);  transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);}
/* Anticipation before expansion */.dropdown-enter {  animation: dropdown-open 300ms cubic-bezier(0.34, 1.56, 0.64, 1);}
@keyframes dropdown-open {  0% { transform: scaleY(0.98); opacity: 0; }  100% { transform: scaleY(1); opacity: 1; }}

Performance Rules

  1. Animate only transform and opacity for GPU acceleration
  2. Use will-change sparingly and remove after animation
  3. Prefer CSS over JavaScript when animation is predictable
  4. Test on low-powered devices

來源與署名

來源:dylantarre/animation-principles位於skills/01-by-domain/web-motion-design提交8359713

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架