exit-patterns
Skill7 starsChanged 10 months agoMITView on GitHub
Element exit animation patterns for dismissals and removals. Use when animating elements leaving the screen, implementing dismiss gestures, or creating removal animations. References M3 exit patterns and timing guidelines.
In this repository87 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- motion-designSkill
- 3d-transformsSkill
- accessibilitySkill
- android-nativeSkill
- animation-recipesSkill
- anticipationSkill
- arc-motionSkill
- attention-choreographySkill
- attentionSkill
- audio-reactiveSkill
- blurSkill
- brand-animationSkill
- cameraSkill
- characterSkill
- choice-resolutionSkill
- cinematicSkill
- code-generationSkill
- colorSkill
- component-animationsSkill
- compositingSkill
- consequenceSkill
- container-transformSkill
- css-advancedSkill
- data-visualizationSkill
- depthSkill
- distortionSkill
- dramaturgySkill
- durationSkill
- easingSkill
- emotional-journeySkill
- emotion-mappingSkill
- emotion-selectionSkill
- empty-statesSkill
- entrance-patternsSkill
- exaggerationSkill
- exportSkill
- figma-integrationSkill
- follow-throughSkill
- frame-timingSkill
- gesture-motionSkill
- glow-shadowSkill
- intentSkill
- ios-nativeSkill
- loading-statesSkill
- loopingSkill
- lottieSkill
- masksSkill
- microstateSkill
- morphingSkill
- motion-auditSkill
- motion-blurSkill
- motion-principlesSkill
- motion-specsSkill
- narrative-arcSkill
- notificationsSkill
- onboardingSkill
- opacitySkill
- orchestratorSkill
- particlesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 72
If element entered from left, exit to left (or opposite).
- Distinctive: line 113
When multiple items exit:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Exit Patterns
Patterns for elements leaving the viewport.
Core Principle
Elements exiting should use:
- Easing:
emphasized-accelerate(0.3, 0, 0.8, 0.15) - Duration: Shorter than entrance (short-3 to short-4)
- Faster than entrance — Don't make users wait
Basic Exit
Fade Out
.fade-out {
animation: fadeOut 200ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
}
@keyframes fadeOut {
to { opacity: 0; }
}Slide Down + Fade
.slide-down {
animation: slideDown 200ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
}
@keyframes slideDown {
to {
opacity: 0;
transform: translateY(16px);
}
}Scale Out + Fade
.scale-out {
animation: scaleOut 200ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
}
@keyframes scaleOut {
to {
opacity: 0;
transform: scale(0.95);
}
}Exit Direction
Exit Toward Destination
Elements should exit toward where they're going.
// Dismiss to trash — exit toward trash icon
<motion.div
exit={{ x: trashPosition.x, opacity: 0 }}
transition={{ duration: 0.2, ease: [0.3, 0, 0.8, 0.15] }}
/>Exit Opposite of Entrance
If element entered from left, exit to left (or opposite).
Gesture-Based Exit
Swipe to Dismiss
const swipeConfidenceThreshold = 10000;
const swipePower = (offset, velocity) => Math.abs(offset) * velocity;
<motion.div
drag="x"
dragConstraints={{ left: 0, right: 0 }}
onDragEnd={(e, { offset, velocity }) => {
if (swipePower(offset.x, velocity.x) > swipeConfidenceThreshold) {
onDismiss();
}
}}
exit={{ x: 300, opacity: 0 }}
transition={{ duration: 0.2, ease: [0.3, 0, 0.8, 0.15] }}
/>Duration Guidelines
| Exit Type | Duration | Easing |
| Quick dismiss | 150ms | emphasized-accelerate |
| Standard exit | 200ms | emphasized-accelerate |
| Modal close | 200ms | emphasized-accelerate |
| Page exit | 300ms | emphasized-accelerate |
Exit vs Entrance Timing
Exits should be faster than entrances:
- Entrance: medium-1 (250ms)
- Exit: short-4 (200ms)
This ratio (~80%) feels natural — users don't want to wait for dismissals.
Staggered Exit
When multiple items exit:
const containerExit = {
exit: {
transition: {
staggerChildren: 0.03, // Faster stagger than entrance
staggerDirection: -1 // Reverse order often feels better
}
}
};
const itemExit = {
exit: {
opacity: 0,
y: -8,
transition: {
duration: 0.15,
ease: [0.3, 0, 0.8, 0.15]
}
}
};Reduced Motion Alternative
const getExitVariant = (prefersReducedMotion) => ({
exit: {
opacity: 0,
y: prefersReducedMotion ? 0 : -8,
transition: {
duration: prefersReducedMotion ? 0.1 : 0.2
}
}
});Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

