Skip to content
Back to search

animate

SkillWorks with Claude CodeGitHub

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/delphi-ai-animate-skill/badge.svg)](/listings/delphi-ai-animate-skill)

HTML

<a href="/listings/delphi-ai-animate-skill"><img src="/api/listings/delphi-ai-animate-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add https://github.com/delphi-ai/animate-skill --skill animate

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 179 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: animate
  3. 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.
  4. ---
  5. # Next.js Animations
  6. ## Overview
  7. 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.
  8. ## Quick Reference
  9. ### Easing Cheat Sheet
  10. | Animation Type | Easing | Duration |
  11. |----------------|--------|----------|
  12. | Element entering | `ease-out` | 200-300ms |
  13. | Element moving on screen | `ease-in-out` | 200-300ms |
  14. | Element exiting | `ease-in` | 150-200ms |
  15. | Hover effects | `ease` | 150ms |
  16. | Opacity only | `linear` | varies |
  17. ### CSS Custom Properties (Recommended)
  18. ```css
  19. :root {
  20. --ease-out-quint: cubic-bezier(.23, 1, .32, 1);
  21. --ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
  22. --ease-out-cubic: cubic-bezier(.33, 1, .68, 1);
  23. }
  24. ```
  25. ## Common Animation Patterns
  26. ### 1. Hover Lift Effect
  27. ```css
  28. .card {
  29. transition: transform 200ms var(--ease-out-quint),
  30. box-shadow 200ms var(--ease-out-quint);
  31. }
  32. .card:hover {
  33. transform: translateY(-4px);
  34. box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  35. }
  36. ```
  37. ### 2. Button Press
  38. ```css
  39. .button {
  40. transition: transform 100ms ease-out;
  41. }
  42. .button:active {
  43. transform: scale(0.97);
  44. }
  45. ```
  46. ### 3. Fade In on Mount (Framer Motion)
  47. ```tsx
  48. <motion.div
  49. initial={{ opacity: 0, y: 20 }}
  50. animate={{ opacity: 1, y: 0 }}
  51. transition={{ duration: 0.3, ease: [.23, 1, .32, 1] }}
  52. >
  53. Content
  54. </motion.div>
  55. ```
  56. ### 4. Modal with Exit Animation
  57. ```tsx
  58. <AnimatePresence>
  59. {isOpen && (
  60. <motion.div
  61. initial={{ opacity: 0, scale: 0.95 }}
  62. animate={{ opacity: 1, scale: 1 }}
  63. exit={{ opacity: 0, scale: 0.95 }}
  64. transition={{ duration: 0.2, ease: "easeOut" }}
  65. >
  66. {children}
  67. </motion.div>
  68. )}
  69. </AnimatePresence>
  70. ```
  71. ### 5. Tab Indicator (Shared Layout)
  72. ```tsx
  73. {tabs.map(tab => (
  74. <button key={tab} onClick={() => setActive(tab)} className="relative px-4 py-2">
  75. {tab}
  76. {active === tab && (
  77. <motion.div
  78. layoutId="tab-indicator"
  79. className="absolute inset-0 bg-blue-500 rounded -z-10"
  80. transition={{ type: "spring", stiffness: 400, damping: 30 }}
  81. />
  82. )}
  83. </button>
  84. ))}
  85. ```
  86. ### 6. Staggered List Animation
  87. ```tsx
  88. const container = {
  89. hidden: { opacity: 0 },
  90. visible: {
  91. opacity: 1,
  92. transition: { staggerChildren: 0.1 }
  93. }
  94. }
  95. const item = {
  96. hidden: { opacity: 0, y: 20 },
  97. visible: { opacity: 1, y: 0 }
  98. }
  99. <motion.ul variants={container} initial="hidden" animate="visible">
  100. {items.map(i => <motion.li key={i} variants={item}>{i}</motion.li>)}
  101. </motion.ul>
  102. ```
  103. ## Golden Rules
  104. 1. **Exits faster than enters**: Exit animations should be ~75% of enter duration
  105. 2. **Only animate transform and opacity**: These are GPU-accelerated
  106. 3. **200-300ms is the sweet spot**: Most animations should be in this range
  107. 4. **Always respect prefers-reduced-motion**: See accessibility section in references
  108. 5. **Use springs for interruptible animations**: Better UX when users interrupt
  109. ## Examples
  110. Complete working examples from the course are in the `examples/` directory:
  111. | Example | Description | Key Techniques |
  112. |---------|-------------|----------------|
  113. | `card-hover.tsx` | Slide-up description on hover | CSS transitions, transform, opacity |
  114. | `toast-stacking.tsx` | Animated toast notifications | CSS custom properties, data-* triggers |
  115. | `text-reveal.tsx` | Staggered letter animation | @keyframes, animation-delay, calc() |
  116. | `shared-layout.tsx` | Element position/size morph | Framer Motion layoutId |
  117. | `animate-height.tsx` | Smooth height changes | useMeasure, animate height |
  118. | `multi-step-flow.tsx` | Directional step wizard | AnimatePresence, custom variants |
  119. | `feedback-popover.tsx` | Button-to-popover expansion | Nested layoutId, form states |
  120. | `app-store-card.tsx` | iOS-style card expansion | Multiple layoutId elements |
  121. To use an example, read it with: `Read examples/<name>.tsx`
  122. ## References
  123. For detailed documentation, read the reference files:
  124. - `references/easing-and-timing.md` - Easing functions, timing guidelines, spring configuration
  125. - `references/css-animations.md` - Transforms, transitions, keyframes, clip-path
  126. - `references/framer-motion.md` - Motion components, AnimatePresence, variants, layout animations, hooks
  127. - `references/performance-accessibility.md` - 60fps optimization, prefers-reduced-motion, accessibility
  128. ## When to Use What
  129. | Scenario | Recommended Approach |
  130. |----------|---------------------|
  131. | Simple hover effects | CSS transitions |
  132. | Enter/exit animations | Framer Motion + AnimatePresence |
  133. | Layout changes | Framer Motion `layout` prop |
  134. | Shared element transitions | Framer Motion `layoutId` |
  135. | Scroll-linked animations | Framer Motion `useScroll` |
  136. | Complex orchestrated animations | Framer Motion variants |
  137. | Drag interactions | Framer Motion drag gestures |
  138. | Performance-critical | CSS-only with transforms |
  139. ## Dependencies
  140. For Framer Motion examples, install:
  141. ```bash
  142. pnpm add framer-motion react-use-measure usehooks-ts
  143. ```
README.md · README · 41 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Animate Skill for Claude Code
  2. Animation patterns and best practices for Next.js/React applications. Based on Emil Kowalski's "Animations on the Web" course.
  3. ## Installation
  4. ```bash
  5. npx skills add https://github.com/delphi-ai/animate-skill --skill animate
  6. ```
  7. ## What's Included
  8. - **SKILL.md** - Quick reference for easing, timing, and common patterns
  9. - **examples/** - 8 complete working examples (hover effects, toasts, modals, etc.)
  10. - **references/** - Detailed docs on CSS animations, Framer Motion, performance, accessibility
  11. ## Usage
  12. Once installed, the skill triggers automatically when you ask Claude Code to implement animations, transitions, hover effects, modals, or any motion in React components.
  13. You can also invoke it directly with `/animate`.
  14. ## Examples Included
  15. | Example | Description |
  16. |---------|-------------|
  17. | `card-hover.tsx` | Slide-up description on hover |
  18. | `toast-stacking.tsx` | Animated toast notifications |
  19. | `text-reveal.tsx` | Staggered letter animation |
  20. | `shared-layout.tsx` | Framer Motion layoutId morph |
  21. | `animate-height.tsx` | Smooth height changes |
  22. | `multi-step-flow.tsx` | Directional step wizard |
  23. | `feedback-popover.tsx` | Button-to-popover expansion |
  24. | `app-store-card.tsx` | iOS-style card expansion |
  25. ## Dependencies
  26. For Framer Motion examples:
  27. ```bash
  28. pnpm add framer-motion react-use-measure usehooks-ts
  29. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.