Exit Animations

dylantarre/animation-principles/skills/05-by-animation-type/exit-animations

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

Use when elements need to leave the screen - closing modals, dismissing notifications, removing items, page transitions out, or any "leaving view" animation.

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

依據迪士尼十二項動畫原則指導介面元素的退場動畫,並提供時長、緩動與 CSS 實作模式。

功能
這個技能為離開畫面的元素提供動畫指引,例如關閉彈窗、關閉通知、移除清單項目以及頁面退場切換。它把迪士尼十二項動畫原則對應到退場行為,並依元素類型給出時長、緩動與運動軌跡建議。它也包含一段 CSS 關鍵影格實作模式,以及移除清單項目時的收合模式。
適用情境
當介面元素需要退場或消失動畫,且希望取得有依據的時長、緩動與運動選擇時使用。適用於彈窗、提示訊息、工具提示、下拉選單、被刪除項目以及頁面退場切換。
執行需求
不需要工具、套件或憑證;僅為說明性內容,不附帶指令碼。其中的 CSS 範例假定為網頁前端環境。

Exit Animations

Apply Disney's 12 principles when removing elements from view.

Principle Application

Squash & Stretch: Scale down to 95-98% on exit. Element compresses slightly as it departs.

Anticipation: Brief pause or micro-movement before departure. A 50ms hesitation acknowledges the exit.

Staging: Exit toward logical destinations. Deleted items fall down, dismissed modals shrink to origin, sidebars return to their edge.

Straight Ahead vs Pose-to-Pose: Pose-to-pose with clear visible→invisible states. Plan the exit trajectory.

Follow Through & Overlapping: Content exits before container. Text fades 50ms before the card collapses.

Slow In/Slow Out: Use ease-in for exits. Gentle start, accelerating departure: cubic-bezier(0.4, 0, 1, 1).

Arcs: Exit on curves, not straight lines. Dismissed notifications arc upward-and-out.

Secondary Action: Combine opacity fade with directional movement. Pure fades feel like errors.

Timing:

  • Exits should be 20-30% faster than entrances
  • Quick exits: 100-150ms (tooltips, dropdowns)
  • Standard exits: 150-200ms (modals, toasts)
  • Graceful exits: 200-300ms (page transitions)

Exaggeration: Scale to 0.9 for dramatic departure, 0.97 for subtle dismissal.

Solid Drawing: Maintain spatial logic. Elements should exit the way they came or toward where they "belong."

Appeal: Exits confirm user intent. Make dismissals feel decisive, not abrupt.

Timing Recommendations

Element TypeDurationEasingNotes
Tooltip100msease-inFaster than entrance
Dropdown150msease-inCollapse upward
Toast150msease-inSlide to origin
Modal200msease-inContent first, overlay last
Deleted Item200msease-inCollapse height after fade
Page250msease-inCurrent page exits, then new enters

Implementation Pattern

css
.exiting {  animation: exit 200ms cubic-bezier(0.4, 0, 1, 1) forwards;}
@keyframes exit {  from {    opacity: 1;    transform: translateY(0) scale(1);  }  to {    opacity: 0;    transform: translateY(-10px) scale(0.98);  }}

Collapse Pattern

For removed list items:

  1. Fade out content (150ms)
  2. Collapse height (150ms, starts at 100ms)
  3. Remove from DOM after animation completes

Total perceived time: 250ms. Always use will-change: opacity, transform for smooth exits.

來源與署名

來源:dylantarre/animation-principles位於skills/05-by-animation-type/exit-animations提交8359713

授權條款: 無授權條款

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

檢舉或申請下架