animate
delphi-ai/animate-skill
Animation patterns and best practices for Next.js/React with CSS and Framer Motion.
What is animate?
Comprehensive guidance for implementing smooth, performant, and accessible animations in Next.js and React applications. Use this skill when building hover effects, page transitions, modals, staggered lists, or any motion in React components. Based on Emil Kowalski's "Animations on the Web" course.
- Easing cheat sheet with timing recommendations for different animation types
- Common animation patterns: hover lift, button press, fade-in, modals, tab indicators, staggered lists
- Golden rules for performant animations (transform/opacity only, 200-300ms sweet spot, exit faster than enter)
- Framer Motion integration with AnimatePresence, variants, layout animations, and shared element transitions
- CSS custom properties and transition best practices for GPU-accelerated animations
- Accessibility guidance including prefers-reduced-motion support
How to install animate
npx skills add https://github.com/delphi-ai/animate-skill --skill animate- React or Next.js project
- For Framer Motion examples: pnpm add framer-motion react-use-measure usehooks-ts
How to use animate
- 1.Review the easing cheat sheet to select appropriate timing for your animation type
- 2.Choose a pattern from the common animation patterns section that matches your use case
- 3.Copy the provided CSS or Framer Motion code snippet into your component
- 4.For complex animations, read the relevant reference file (easing-and-timing.md, css-animations.md, framer-motion.md, or performance-accessibility.md)
- 5.Test with prefers-reduced-motion to ensure accessibility compliance
- 6.Verify animations run at 60fps using browser DevTools
Use cases
- Implementing card hover effects with smooth lift and shadow transitions
- Creating animated modal dialogs with scale and opacity transitions
- Building staggered list animations where items appear sequentially
- Adding tab indicator animations that morph between selected tabs
- Designing toast notification stacks with entrance and exit animations
- React/Next.js developers building interactive user interfaces
- Frontend engineers optimizing animation performance and accessibility
- Designers implementing motion design specifications in code
- Teams following Emil Kowalski's animation best practices
animate FAQ
Use CSS transitions for simple hover effects and static animations. Use Framer Motion for enter/exit animations, layout changes, shared element transitions, and complex orchestrated animations.
200-300ms is the sweet spot for most animations. Exit animations should be ~75% of enter duration (e.g., 200ms enter, 150ms exit).
Transform and opacity are GPU-accelerated properties. Animating other properties like width, height, or position causes layout recalculations and reduces performance.
Use the prefers-reduced-motion media query to disable or simplify animations for users with this preference. See the performance-accessibility.md reference for implementation details.
Complete examples are in the examples/ directory, including card-hover.tsx, toast-stacking.tsx, text-reveal.tsx, shared-layout.tsx, and more. Read them with: Read examples/<name>.tsx
Full instructions (SKILL.md)
Source of truth, from delphi-ai/animate-skill.
name: animate description: Animation patterns and best practices for Next.js/React applications. Use this skill when implementing animations, transitions, hover effects, page transitions, modals, or any motion in React components. Based on Emil Kowalski's "Animations on the Web" course.
Next.js Animations
Overview
This skill provides comprehensive guidance for implementing smooth, performant, and accessible animations in Next.js and React applications. It covers CSS animations, Framer Motion, easing principles, and accessibility considerations.
Quick Reference
Easing Cheat Sheet
| Animation Type | Easing | Duration |
|---|---|---|
| Element entering | ease-out | 200-300ms |
| Element moving on screen | ease-in-out | 200-300ms |
| Element exiting | ease-in | 150-200ms |
| Hover effects | ease | 150ms |
| Opacity only | linear | varies |
CSS Custom Properties (Recommended)
:root {
--ease-out-quint: cubic-bezier(.23, 1, .32, 1);
--ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
--ease-out-cubic: cubic-bezier(.33, 1, .68, 1);
}
Common Animation Patterns
1. Hover Lift Effect
.card {
transition: transform 200ms var(--ease-out-quint),
box-shadow 200ms var(--ease-out-quint);
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
2. Button Press
.button {
transition: transform 100ms ease-out;
}
.button:active {
transform: scale(0.97);
}
3. Fade In on Mount (Framer Motion)
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, ease: [.23, 1, .32, 1] }}
>
Content
</motion.div>
4. Modal with Exit Animation
<AnimatePresence>
{isOpen && (
<motion.div
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.95 }}
transition={{ duration: 0.2, ease: "easeOut" }}
>
{children}
</motion.div>
)}
</AnimatePresence>
5. Tab Indicator (Shared Layout)
{tabs.map(tab => (
<button key={tab} onClick={() => setActive(tab)} className="relative px-4 py-2">
{tab}
{active === tab && (
<motion.div
layoutId="tab-indicator"
className="absolute inset-0 bg-blue-500 rounded -z-10"
transition={{ type: "spring", stiffness: 400, damping: 30 }}
/>
)}
</button>
))}
6. Staggered List Animation
const container = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: { staggerChildren: 0.1 }
}
}
const item = {
hidden: { opacity: 0, y: 20 },
visible: { opacity: 1, y: 0 }
}
<motion.ul variants={container} initial="hidden" animate="visible">
{items.map(i => <motion.li key={i} variants={item}>{i}</motion.li>)}
</motion.ul>
Golden Rules
- Exits faster than enters: Exit animations should be ~75% of enter duration
- Only animate transform and opacity: These are GPU-accelerated
- 200-300ms is the sweet spot: Most animations should be in this range
- Always respect prefers-reduced-motion: See accessibility section in references
- Use springs for interruptible animations: Better UX when users interrupt
Examples
Complete working examples from the course are in the examples/ directory:
| Example | Description | Key Techniques |
|---|---|---|
card-hover.tsx | Slide-up description on hover | CSS transitions, transform, opacity |
toast-stacking.tsx | Animated toast notifications | CSS custom properties, data-* triggers |
text-reveal.tsx | Staggered letter animation | @keyframes, animation-delay, calc() |
shared-layout.tsx | Element position/size morph | Framer Motion layoutId |
animate-height.tsx | Smooth height changes | useMeasure, animate height |
multi-step-flow.tsx | Directional step wizard | AnimatePresence, custom variants |
feedback-popover.tsx | Button-to-popover expansion | Nested layoutId, form states |
app-store-card.tsx | iOS-style card expansion | Multiple layoutId elements |
To use an example, read it with: Read examples/<name>.tsx
References
For detailed documentation, read the reference files:
references/easing-and-timing.md- Easing functions, timing guidelines, spring configurationreferences/css-animations.md- Transforms, transitions, keyframes, clip-pathreferences/framer-motion.md- Motion components, AnimatePresence, variants, layout animations, hooksreferences/performance-accessibility.md- 60fps optimization, prefers-reduced-motion, accessibility
When to Use What
| Scenario | Recommended Approach |
|---|---|
| Simple hover effects | CSS transitions |
| Enter/exit animations | Framer Motion + AnimatePresence |
| Layout changes | Framer Motion layout prop |
| Shared element transitions | Framer Motion layoutId |
| Scroll-linked animations | Framer Motion useScroll |
| Complex orchestrated animations | Framer Motion variants |
| Drag interactions | Framer Motion drag gestures |
| Performance-critical | CSS-only with transforms |
Dependencies
For Framer Motion examples, install:
pnpm add framer-motion react-use-measure usehooks-ts
Related skills
More from delphi-ai/animate-skill and the wider catalog.

token-efficiency
Minimize token costs with smart file handling, model selection, and bash-first strategies for Claude Code.

social-media-marketing
Social media strategy expert for Instagram, Facebook, TikTok, LinkedIn, and content planning.

agents-best-practices
Use this skill when designing, generating an MVP blueprint for, auditing, refactoring, or explaining an agentic harness for any domain. Covers provider-neutral agent architecture for OpenAI, Anthropic, and OpenAI-compatible APIs: agent loops, tool design, permissions, system prompts, planning, goals, context compaction, memory, skills, MCP/external connectors, observability, evals, prompt caching, agent-legible environments, feedback loops, and safety.

design-mobile-apps
Design mobile app UI screens with AI using Sleek's REST API.

agent-fs
Agent-first filesystem with versioning, search, and S3/local storage—CLI with JSON output for agent workflows.

translate-book
Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents