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 从公开仓库中收录这些内容。

举报或申请下架