micro-interaction

Implements UI micro-interactions with Framer Motion and modern CSS animation techniques.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/langgenius/due-date-hq-jwl --skill micro-interaction-langgenius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: micro-interaction
Source: https://github.com/langgenius/due-date-hq-jwl/tree/main/.claude/skills/micro-interaction
Command: npx skills add https://github.com/langgenius/due-date-hq-jwl --skill micro-interaction-langgenius

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires motion, and includes references (resource) components.

What problem does it solve? Building polished UI motion—hover feedback, toasts, drawers, list reordering, shared-element transitions—requires knowing the right timing, easing, and APIs across Framer Motion and modern CSS, and getting it wrong produces janky or inaccessible interfaces. ## Core Features & Use Cases - Framer Motion patterns: Gestures and springs, AnimatePresence enter/exit, layout and layoutId shared-element transitions, Reorder drag-to-sort, and reduced-motion handling via useReducedMotion and MotionConfig. - Pure CSS path: @starting-style enter animations, transition-behavior: allow-discrete for display toggles, popover/dialog exit animation, animated toggles, spinners, and @property custom-property animation. - Verification workflow: A ?state= seek harness plus screenshot loop to capture deterministic idle/hover/open states and check for artifacts like border-radius distortion or toast layout gaps. - Use Case: A designer asks for an animated like button with a heart pop and a toast that slides in on submit; the skill delivers one standalone HTML file using motion/react from CDN, verified across states with screenshots. ## Quick Start Ask the AI to build an animated toggle switch with press feedback and a slide-in toast as a single standalone HTML file.

Frequently Asked Questions about micro-interaction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I animate a component mounting and unmounting in React?

Wrap conditionally rendered children in AnimatePresence from motion/react and give each child a stable key with initial, animate, and exit props. Use mode="popLayout" for lists so removed items do not hold space while exiting.

How to create a shared-element transition with Framer Motion?

Assign the same layoutId to two elements in different components; Framer Motion animates between them as one mounts and the other unmounts. Watch for border-radius and text distortion during scale, and use layout="position" when only position should animate.

Can CSS animate an element to display:none without JavaScript?

Yes, modern CSS supports this with transition-behavior: allow-discrete, which lets display flip at the end of an exit transition, combined with @starting-style to define enter-from values. It works in current Chrome, Edge, and Safari with a no-animation fallback for older browsers.

What duration and easing should UI micro-interactions use?

Keep micro-interactions in the 100-250ms range; anything over about 400ms feels laggy for click responses. Use ease-out like cubic-bezier(0.16, 1, 0.3, 1) for entrances, faster ease-in for exits, and springs around stiffness 400, damping 30 for snappy feedback.

How do I respect prefers-reduced-motion in animations?

In CSS, add a media query that reduces animation and transition durations; in Framer Motion, use useReducedMotion or wrap the app in MotionConfig with reducedMotion="user". Keep opacity feedback but drop large spatial movement rather than removing feedback entirely.

Why does my Framer Motion layout animation distort border-radius?

A plain layout element scales non-uniformly, which distorts border-radius and text during the animation. Add layout to direct children that should counter-scale, animate borderRadius as a motion value, or use layout="position" to animate position only.