Create a Micro-Interaction Specification Document for UI Components

Specify micro-interactions for UI components with exact animation values, haptic feedback, accessibility, and implementation notes.

πŸ“ The Prompt

Create a detailed micro-interaction specification for [NUMBER, e.g., 6-8] key UI components in [APP NAME], a [APP TYPE] application built with [TECH STACK/FRAMEWORK, e.g., React, Flutter, SwiftUI]. The design language is [STYLE, e.g., Material Design 3, custom minimal, glassmorphic]. For each micro-interaction, document the following using this structured template: **Component Name**: [e.g., Like Button, Toggle Switch, Add to Cart] 1. **Trigger**: What initiates the interaction (tap, hover, long-press, swipe, scroll threshold, system event). 2. **States & Transitions**: Map every state the component passes through: - Default β†’ Hover β†’ Pressed β†’ Active/Completed β†’ Reset - Include visual changes per state: scale, color, opacity, icon swap, shape morph - Specify exact transition values: duration (ms), easing curve (e.g., cubic-bezier(0.4, 0, 0.2, 1)), delay 3. **Feedback Layers**: Define multi-sensory feedback: - Visual: color change, ripple, checkmark animation, particle burst - Haptic: feedback type (light, medium, heavy, or custom pattern) for mobile - Audio: sound effect description and trigger condition (optional, specify when appropriate) 4. **Rules & Logic**: - Is the action reversible (toggle) or one-time? - Optimistic UI: does the visual update before server confirmation? - Error recovery: what happens visually if the action fails after optimistic update? - Debounce/throttle: any rate-limiting on rapid repeated triggers? 5. **Accessibility**: - ARIA role and state changes - Focus indicator styling - Reduced motion alternative (prefers-reduced-motion media query behavior) 6. **Implementation Notes**: Provide a brief pseudo-code or CSS snippet illustrating the core animation. Cover these component categories: [CATEGORY 1, e.g., form validation], [CATEGORY 2, e.g., navigation transitions], [CATEGORY 3, e.g., data feedback actions], and [CATEGORY 4, e.g., onboarding cues]. Format the output as a motion design handoff document.

πŸ’‘ Tips for Better Results

Keep micro-interactions under 400ms for direct-manipulation feedback (buttons, toggles) and under 700ms for transitional animations (page changes, modals)β€”anything longer feels sluggish. Always define the 'prefers-reduced-motion' fallback first, then layer on animation; this ensures accessibility by default. Document interactions in a shared motion library so developers and designers reference a single source of truth.

🎯 Use Cases

Motion designers, UI engineers, and design system maintainers use this when standardizing interactive behavior across a product to ensure consistent, delightful, and accessible user experiences.

πŸ”— Related Prompts

🎨 Design intermediate

UI/UX Design Review Checklist

Get a comprehensive UI/UX review covering hierarchy, accessibility, and responsiveness.

🎨 Design intermediate

Generate a Custom Color Palette for Any Brand or Project

Generate a complete, accessible color palette with HEX values, usage guidelines, and dark mode variants for any brand or project.

🎨 Design intermediate

Find the Perfect Typography Pairing for Your Design Project

Get expert typography pairing recommendations with type scales, spacing guidelines, and CSS fallback stacks for any design project.

🎨 Design advanced

Create a Detailed Wireframe Description for UI/UX Design

Generate a detailed, section-by-section wireframe description with layout specs, interaction flows, and responsive behavior for any page.

🎨 Design intermediate

Generate a Custom Color Palette for Your Brand or Project

Generate a complete, accessible color palette with hex codes, usage guidelines, dark mode variants, and brand-aligned reasoning.

🎨 Design advanced

Create a Detailed User Flow Diagram for Your Digital Product

Design a comprehensive text-based user flow diagram with decision points, error states, and UX annotations for any digital product.