Skip to main content
skill CX Codex

page-transitions — Claude Code skill: route and modal animation

A skill for animating route changes, view transitions and modal opens. It gives the agent timings and easing curves instead of guesswork.

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

What page-transitions does

The skill maps Disney's twelve animation principles onto route changes, view transitions and navigation. Inside you get a principle-to-implementation table, ready CSS patterns for crossfade, slide and shared element, a timing reference and a navigation pattern table.

The agent gets specifics. Exit runs on ease-in, enter on ease-out, and linear easing is called out as feeling broken. Durations are split by type: crossfade 200-300ms, slide forward 300-400ms, modal open 250-350ms, tab switch 150-200ms. The shared element example uses the View Transitions API with document.startViewTransition and view-transition-name.

The performance section says to animate transform and opacity only, and to test transitions on slow devices. If your project already has an animation system, the timings here need reconciling with it — two sets of curves fighting each other is a real risk.

What it helps with

  • pick a duration and easing curve for a route change
  • carry context from a list view into a detail view
  • animate modal open and close
  • make back navigation faster than forward
  • move a transition onto the View Transitions API

Example prompts for the agent

  • Animate the transition from the product list to the detail card with a shared element, 300ms
  • Add a modal open animation with scale and fade, ease-out
  • Rewrite the tab switch to use transform and opacity, drop the layout property animation

How to install page-transitions

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill page-transitions -a claude-code

2Manually: put the files in place

~/.claude/skills/page-transitions/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/page-transitions/

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

Questions about page-transitions

How do I install page-transitions in Claude?

Run npx skills add dylantarre/animation-principles --skill page-transitions -a claude-code. The skill file then lives at ~/.claude/skills/page-transitions/SKILL.md.

What does page-transitions do?

It tells the agent how to animate route changes, views and modals: which principles apply, what timings and curves to use, and which navigation patterns fit.

Which platforms does the skill support?

Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each platform has its own install command and skill file path.

Source text

SKILL.md · MIT
---
name: page-transitions
description: Use when implementing route changes, view transitions, modal opens/closes, or navigation animation in web and mobile applications.
---

# Page Transition Animation

Apply Disney's 12 animation principles to route changes, view transitions, and navigation patterns.

## Quick Reference

| Principle | Page Transition Implementation |
|-----------|-------------------------------|
| Squash & Stretch | Entering page elastic effect |
| Anticipation | Exit animation before enter |
| Staging | Hero elements bridge views |
| Straight Ahead / Pose to Pose | Shared element vs crossfade |
| Follow Through / Overlapping | Content settles after nav |
| Slow In / Slow Out | Asymmetric enter/exit easing |
| Arc | Slide transitions with curve |
| Secondary Action | Background, nav state changes |
| Timing | 200-500ms total transition |
| Exaggeration | Reserved for emphasis moments |
| Solid Drawing | Consistent spatial model |
| Appeal | Smooth, oriented navigation |

## Principle Applications

**Squash & Stretch**: Incoming pages can have subtle elastic settle. Modal sheets bounce slightly on full open. Pull-to-navigate stretches before triggering.

**Anticipation**: Current page begins exit before new page enters. Slight fade or scale prepares for change. Navigation indicator updates before page swaps.

**Staging**: Shared/hero elements maintain context across views. Common elements (nav, footer) stay stable. New content area receives transition focus.

**Straight Ahead vs Pose to Pose**: Shared element transitions morph continuously (straight ahead). Crossfades swap between discrete states (pose to pose). Choose based on content relationship.

**Follow Through & Overlapping**: Page content settles after initial position. Staggered content entry—header, then body, then footer. Images load with subtle fade after container.

**Slow In / Slow Out**: Exit: ease-in (accelerate away). Enter: ease-out (decelerate in). Combined: ease-in-out for shared elements. Never linear—feels broken.

**Arc**: Slide transitions can curve slightly. Stack navigation implies z-depth. Circular reveals expand from trigger point.

**Secondary Action**: Header updates title during transition. Bottom nav indicator moves. Background color shifts. Scroll position resets with transition.

**Timing**: Quick transitions: 200-300ms. Standard: 300-400ms. Complex: 400-500ms. Modal/sheet: 250-350ms. Back navigation often faster than forward.

**Exaggeration**: Save exaggeration for key moments—onboarding, achievement. Regular navigation should be smooth, not theatrical. Users navigate frequently.

**Solid Drawing**: Maintain consistent spatial metaphor. If pages stack, maintain z-order. If pages slide, direction should be consistent. Users build mental model from transitions.

**Appeal**: Transitions should feel helpful, not impressive. Fast, smooth, oriented. Users should understand where they came from and went to.

## Transition Patterns

### Crossfade (Default)
```css
.page-exit {
    opacity: 1;
}
.page-exit-active {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.page-enter {
    opacity: 0;
}
.page-enter-active {
    opacity: 1;
    transition: opacity 200ms ease-out;
}
```

### Slide (Hierarchical)
```css
/* Forward navigation */
.page-enter {
    transform: translateX(100%);
}
.page-enter-active {
    transform: translateX(0);
    transition: transform 300ms ease-out;
}
.page-exit-active {
    transform: translateX(-30%);
    transition: transform 300ms ease-in;
}

/* Back navigation - reversed */
.page-enter {
    transform: translateX(-30%);
}
.page-exit-active {
    transform: translateX(100%);
}
```

### Shared Element (Hero)
```javascript
// View Transitions API
document.startViewTransition(() => {
    updateDOM();
});

// CSS for specific element
.hero-image {
    view-transition-name: hero;
}
::view-transition-old(hero),
::view-transition-new(hero) {
    animation-duration: 300ms;
}
```

## Timing Reference

| Transition Type | Duration | Exit | Enter |
|----------------|----------|------|-------|
| Crossfade | 200-300ms | ease-in | ease-out |
| Slide forward | 300-400ms | ease-in | ease-out |
| Slide back | 250-350ms | ease-in | ease-out |
| Modal open | 250-350ms | — | ease-out |
| Modal close | 200-300ms | ease-in | — |
| Shared element | 300-400ms | n/a | ease-in-out |
| Tab switch | 150-200ms | instant | ease-out |

## Navigation Patterns

| Pattern | Transition | Direction |
|---------|------------|-----------|
| Drill-down (list→detail) | Slide left / shared element | Right = forward |
| Tab bar | Fade / slide | Horizontal |
| Bottom sheet | Slide up | Vertical |
| Modal | Scale + fade | Z-axis |
| Back button | Reverse of forward | Left = back |

## Performance

1. Use `transform` and `opacity` only
2. Hardware acceleration: `will-change: transform`
3. Reduce motion: instant transitions
4. Test on slow devices—transitions must not block
5. View Transitions API: native performance

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

From the same set86

game-designer A skill for game animation work: it maps Disney's 12 principles onto responsive controls and satisfying impact feedback. CX Codex +1 1,000installs after-effects Walks your agent through Disney's 12 animation principles inside Adobe After Effects, from squash and stretch to appeal. Useful when a character or UI needs to move right. CX Codex +1 887installs css-native This skill gets your agent writing motion with plain CSS: @keyframes, transition, transform. Useful when interface animation should not pull in a JS library. CX Codex +1 714installs saas-productivity Guides motion design for task, form, panel, and notification interfaces. Use it when work-focused animation needs feedback without distraction. CX Codex +1 706installs fitness-wellness A skill that sets timing and easing for animations in fitness apps, workout trackers and meditation screens. Useful when motion has to motivate, not just move. CX Codex +1 661installs presentations A skill for animation in Keynote, PowerPoint and Google Slides. It hands you timings, build order and transition choices. CX Codex +1 648installs e-commerce-retail A skill that maps Disney's 12 animation principles onto shopping interfaces: product cards, cart, checkout. Useful when the store should feel premium without slowing the buy. CX Codex +1 645installs educator-teacher A skill for anyone building explainer videos: it maps Disney's 12 animation principles onto teaching tasks and adds pedagogy notes. CX Codex +1 642installs

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