Animations
Skill PIXARTSeu/Synapse/packages/codegraph/data/skill/animations
Animation knowledge base - Framer Motion, CSS animations, scroll effects, best practices. Use when adding animations, transitions, motion effects, or scroll-triggered effects to UI components.From its SKILL.md
npx -y skills add PIXARTSeu/Synapse --skill animationsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, 823 tokens by cl100k_base, as published. Nobody here has run it
Animations Knowledge Base
Framer Motion Setup
npm install framer-motion
Basic Animations
import { motion } from 'framer-motion';
// Fade in
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
>
Content
</motion.div>
// Slide up
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5, ease: 'easeOut' }}
>
Content
</motion.div>
Scroll Animations
<motion.div
initial={{ opacity: 0, y: 50 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: '-100px' }}
transition={{ duration: 0.5 }}
>
Animates when in view
</motion.div>
Stagger Children
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: { staggerChildren: 0.1 }
}
};
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 }
};
<motion.ul variants={container} initial="hidden" animate="show">
{items.map(i => (
<motion.li key={i} variants={item}>{i}</motion.li>
))}
</motion.ul>
Hover & Tap
<motion.button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
transition={{ type: 'spring', stiffness: 400 }}
>
Click me
</motion.button>
Page Transitions
// AnimatePresence for exit animations
import { AnimatePresence } from 'framer-motion';
<AnimatePresence mode="wait">
<motion.div
key={pathname}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.3 }}
>
{children}
</motion.div>
</AnimatePresence>
Reduced Motion
import { useReducedMotion } from 'framer-motion';
function Component() {
const shouldReduceMotion = useReducedMotion();
return (
<motion.div
animate={{ y: shouldReduceMotion ? 0 : 20 }}
transition={{ duration: shouldReduceMotion ? 0 : 0.3 }}
/>
);
}
CSS Animations
/* Fade in up */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-in-up {
animation: fadeInUp 0.5s ease-out forwards;
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
.animate-fade-in-up {
animation: none;
}
}
Animation Tokens
| Name | Duration | Easing |
|---|---|---|
| fast | 200ms | ease-out |
| normal | 300ms | ease-out |
| slow | 500ms | ease-in-out |
Best Practices
- GPU properties only: transform, opacity
- Respect reduced motion: Always check preference
- Purpose: Every animation serves a purpose
- Subtle: Don't distract from content
- 60fps: Test on low-end devices
What ships with it: 3 files
2.6 KB alongside SKILL.md
evals/
- evals.json1.6 KB
- trigger_evals.json848 B
- learnings.md224 B