interaction-design

Implement microinteractions, motion design, and scroll animations using Framer Motion, GSAP, and CSS.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill interaction-design-dhruv-ghanchi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: interaction-design
Source: https://github.com/Dhruv-Ghanchi/Portfolio-Webiste/tree/main/.agents/skills/interaction-design
Command: npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill interaction-design-dhruv-ghanchi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building polished UI feedback, transitions, and animations from scratch is time-consuming and error-prone, often resulting in janky motion, inconsistent timing, or accessibility violations. ## Core Features & Use Cases - Microinteraction Patterns: Ready-to-use React components for loading buttons, floating labels, toast notifications, optimistic updates, and swipe gestures. - Animation Library Guidance: Detailed references for Framer Motion, GSAP ScrollTrigger, Web Animations API, and View Transitions API with working code examples. - Scroll & Reveal Animations: Patterns for parallax effects, staggered list reveals, scroll progress indicators, and sticky sections. - Use Case: When adding a page transition to a Next.js app, use the AnimatePresence pattern with spring physics and reduced-motion fallbacks to ship accessible, 60fps transitions. ## Quick Start Add a smooth hover and tap microinteraction to my button component using Framer Motion with spring physics and reduced-motion support.

Frequently Asked Questions about interaction-design

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

FAQPage Schema
How do I add microinteractions to React components?

Use Framer Motion's motion components with whileHover and whileTap props for instant feedback, combined with spring transitions like stiffness 400 and damping 17. For state changes, wrap conditional content in AnimatePresence to animate enter and exit.

Framer Motion vs GSAP for React animations?

Framer Motion suits declarative UI animations, gestures, and layout transitions with its React-native API. GSAP excels at complex timelines, scroll-triggered effects via ScrollTrigger, and text splitting, but requires manual cleanup with gsap.context in useLayoutEffect.

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

Check the prefers-reduced-motion media query with window.matchMedia and set animation duration to zero when matched. In CSS, wrap all animations in a media query that forces duration to 0.01ms so users with motion sensitivity see instant state changes.

Why are my CSS animations janky and dropping frames?

Jank occurs when animating layout properties like width, height, top, or left, which trigger reflow. Animate only transform and opacity for GPU-accelerated 60fps motion, and use will-change sparingly to hint the browser.

How do I implement scroll-triggered reveal animations?

Use an Intersection Observer hook to detect when elements enter the viewport, then apply transition classes or Framer Motion animate props. For scroll-linked effects like parallax, map useScroll progress to transform values with useTransform.