3.1 KiB
3.1 KiB
| name | description |
|---|---|
| premium-motion-animations | Guides the implementation of fluid motion design, physics-based Bézier transitions, staggered entry animations, border glows, and tactile micro-interactions for frontend components. Use when creating, animating, or polishing interactive components, modals, chat messages, or transitions to achieve a state-of-the-art SaaS look and feel. |
Premium Motion & Animation Skill
Core Animation Guidelines
-
Physics-Based Bézier Easing:
- Never use default linear transitions for layout elements or panels.
- Use high-end cubic-bezier curves for fluid acceleration and natural deceleration:
- Enter / Reveal curve:
cubic-bezier(0.16, 1, 0.3, 1)(smooth elastic ease-out). - Exit / Dismiss curve:
cubic-bezier(0.7, 0, 0.84, 0)(crisp ease-in). - Snappy micro-interactions:
cubic-bezier(0.2, 0.8, 0.2, 1).
- Enter / Reveal curve:
-
Staggered Cascade Entries (Lists & Messages):
- When rendering lists of cards, chat messages, or topic chips, stagger their entrance animations so they do not all pop in simultaneously.
- Example implementation with dynamic animation delays:
{items.map((item, index) => ( <div key={item.id} className="animate-slide-up opacity-0" style={{ animationDelay: `${index * 40}ms`, animationFillMode: 'forwards' }} > {item.content} </div> ))}
-
Keyframe Definitions (Tailwind / CSS):
- Slide & Fade In:
@keyframes slideUpFade { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } - Beacon Pulse (Radar):
<span className="relative flex h-2.5 w-2.5"> <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-lime-400 opacity-75" /> <span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-lime-500" /> </span>
- Slide & Fade In:
-
Tactile Hover & Press Micro-Interactions:
- Buttons, action cards, and icons must communicate physics feedback:
- Base:
transition-all duration-200 ease-out - Hover:
hover:scale-[1.02] hover:-translate-y-0.5 - Active / Click:
active:scale-[0.97] active:translate-y-0
- Base:
- Subtle brightness/glow change:
hover:shadow-[0_4px_20px_rgba(132,204,22,0.2)]
- Buttons, action cards, and icons must communicate physics feedback:
-
Animated Border Beams & Shimmers:
- Active cards and focused search bars can use a gradient border sweep or subtle shimmer:
background: linear-gradient(60deg, rgba(255,255,255,0.05), rgba(132,204,22,0.15), rgba(255,255,255,0.05)); background-size: 200% 100%; animation: shimmer 4s infinite linear;
- Active cards and focused search bars can use a gradient border sweep or subtle shimmer:
-
Hardware Acceleration & Performance:
- Always animate GPU-accelerated properties:
transform,opacity,filter. - Never animate layout geometry properties like
height,width,top,left,margin, orpaddingdirectly when animating motion; use transforms (scale,translate3d). - Add
will-change: transform, opacityonly during active transitions, avoiding long-term memory leaks.
- Always animate GPU-accelerated properties: