Skip to main content
skill CX Codex

exit-animations — Claude Code skill: exit animations done right

A skill that tells the agent how to animate elements leaving the screen: closing modals, dismissing notifications, removing list items.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dylantarre/animation-principles --skill exit-animations -a claude-code
Open on GitHub

What exit-animations does

The skill maps Disney's 12 animation principles onto elements leaving view. The agent gets concrete rules: scale down to 95–98% on the way out, a brief hesitation before departure, and exits that head somewhere logical — deleted rows fall down, modals shrink back to their origin, sidebars return to their edge.

There is a timing table by element type: tooltips 100ms, dropdowns and toasts 150ms, modals and deleted items 200ms, page transitions 250ms, all ease-in. A CSS pattern ships with it, using @keyframes and cubic-bezier(0.4, 0, 1, 1), plus a collapse sequence for removed list items: fade the content, collapse the height, then drop it from the DOM once the animation finishes.

The skill advises exits 20–30% faster than entrances and will-change: opacity, transform. If your project already has duration tokens, expect to reconcile them by hand — the skill hands out fixed numbers rather than reading them from a theme.

What it helps with

  • close a modal so it shrinks back to its origin instead of vanishing
  • collapse a deleted list row without shoving its neighbours
  • send a dismissed toast arcing up and out
  • pick durations and easing for tooltips, dropdowns and page transitions
  • make an exit finish faster than the matching entrance

Example prompts for the agent

  • Animate the modal close using the exit-animations skill: content fades first, overlay last
  • When a task row is deleted it should collapse — apply exit-animations
  • Set up the toast dismissal: 150ms, ease-in, arcing upward

How to install exit-animations

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill exit-animations -a claude-code

2Manually: put the files in place

~/.claude/skills/exit-animations/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/exit-animations/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about exit-animations

How do I install exit-animations in Claude?

Run npx skills add dylantarre/animation-principles --skill exit-animations -a claude-code. The skill file lands at ~/.claude/skills/exit-animations/SKILL.md.

What does exit-animations do?

It gives the agent rules for elements leaving the screen: compression, a pause before departure, exit direction, timings and easing. It covers modals closing, notifications dismissing, items being removed and page transitions out.

What timings does the skill use?

Tooltips 100ms, dropdowns and toasts 150ms, modals and deleted items 200ms, page transitions 250ms — all ease-in. Exits are advised to run 20–30% faster than entrances.

Source text

SKILL.md · MIT
---
name: exit-animations
description: Use when elements need to leave the screen - closing modals, dismissing notifications, removing items, page transitions out, or any "leaving view" animation.
---

# 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 Type | Duration | Easing | Notes |
|-------------|----------|--------|-------|
| Tooltip | 100ms | ease-in | Faster than entrance |
| Dropdown | 150ms | ease-in | Collapse upward |
| Toast | 150ms | ease-in | Slide to origin |
| Modal | 200ms | ease-in | Content first, overlay last |
| Deleted Item | 200ms | ease-in | Collapse height after fade |
| Page | 250ms | ease-in | Current 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 · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor