Apply interface craft when building or reviewing UI - motion, easing, timing, springs, component feel, and visual foundations. Use when building a component, animation, transition, hover or press state, modal, drawer, toast, or when polishing an interface so it feels right. Says "make this feel better", "add an animation", "polish the UI", "review this component".
git clone https://github.com/rohitg00/pro-workflow.git--- name: design-engineering description: Apply interface craft when building or reviewing UI - motion, easing, timing, springs, component feel, and visual foundations. Use when building a component, animation, transition, hover or press state, modal, drawer, toast, or when polishing an interface so it feels right. Says "make this feel better", "add an animation", "polish the UI", "review this component". --- # design-engineering In a world where most software works well enough, feel is the differentiator. Most of what makes an interface feel right is detail the user never consciously notices - the aggregate of small correct choices. Build for that aggregate. ## Motion decision framework Answer these in order before writing any animation. ### 1. Should it animate at all? The deciding factor is frequency. The more often a user sees it, the less it should move. | How often the user sees it | Decision | |----------------------------|----------| | 100+ times/day (shortcuts, command palette) | No animation, ever | | Tens of times/day (hover, list nav) | Remove or drastically reduce | | Occasional (modals, drawers, toasts) | Standard animation | | Rare or first-time (onboarding, celebration) | Room for delight | Never animate a keyboard-initiated action. It repeats all day; animation makes it feel slow and disconnected from the keypress. ### 2. What is the purpose? Every animation needs an answer to "why does this move?" Valid ones: spatial consistency (enters and exits the same edge), state change, feedback (a press that confirms the interface heard you), or preventing a jarring appear/disappear. "It looks cool" is not a purpose for anything the user sees often. ### 3. What easing? - Entering or exiting -> `ease-out` (fast start, feels responsive). - Moving or morphing on screen -> `ease-in-out`. - Hover or color change -> `ease`. - Constant motion (marquee, progress) -> `linear`. Never use `ease-in` for UI. It delays the first moment of movement - exactly when the user is watching - so a 300ms `ease-in` dropdown feels slower than a 300ms `ease-out` one. The built-in curves are weak; use stronger custom ones: ```css --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* UI interactions */ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* on-screen movement */ --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer */ ``` ### 4. How fast? | Element | Duration | |---------|----------| | Button press feedback | 100-160ms | | Tooltip, small popover | 125-200ms | | Dropdown, select | 150-250ms | | Modal, drawer | 200-500ms | Keep frequent, interactive UI under 300ms; the modal and drawer range above (up to 500ms) is the deliberate exception for occasional, first-time surfaces. Perceived speed is real: a faster spinner makes a load feel faster at the same load time, and an instant tooltip after the first one makes a whole toolbar feel quick. ## Springs Springs settle on physics, not a fixed duration, so they feel alive and, unlike CSS keyframes, keep their velocity when interrupted. Reach for them on drag and gesture interactions the user can reverse mid-motion, and on decorative, mouse-tracked motion. Keep bounce subtle (0.1 to 0.3) and usually absent - save it for drag-to-dismiss and playful moments, not functional UI. ## Component feel - **Press feedback.** Any pressable element gets `transform: scale(0.97)` on `:active` with a ~160ms `ease-out` transition. Subtle (0.95 to 0.98); it makes the interface feel like it is listening. - **Never animate from `scale(0)`.** Nothing real appears from nothing. Start at `scale(0.9)` or higher plus opacity so the entrance has shape. - **Scale from the trigger.** Popovers and dropdowns scale from their origin, not their center. Modals stay centered. - **Respect `prefers-reduced-motion`.** Drop or shorten non-essential motion. ## Visual foundations - One spacing scale, one type scale. Consistency reads as intent; ad-hoc values read as noise. - Restrained color: a small palette with clear roles beats many accents. - Make every interactive state explicit - hover, active, focus-visible, disabled. A control with no states feels dead. ## Review format When reviewing UI code, output a single markdown table, one row per issue, with `Before | After | Why`. Do not use separate "Before:" / "After:" lines. | Before | After | Why | |--------|-------|-----| | `transition: all 300ms` | `transition: transform 200ms ease-out` | Name exact properties; avoid `all` | | `transform: scale(0)` | `scale(0.95); opacity: 0` | Nothing appears from nothing | | `ease-in` on a dropdown | strong `ease-out` | `ease-in` reads as sluggish | | no `:active` state | `scale(0.97)` on `:active` | Presses must feel responsive |
1. **Prepare Your Work:** Open the component or interface in your design tool (e.g., Figma, Framer) or codebase (e.g., React, Swift). Identify the specific interaction or state you want to improve (e.g., hover, press, modal entry/exit). 2. **Provide Context:** Share the tool, language, and any constraints (e.g., "This is a React component using Tailwind CSS" or "Built in Framer Motion for a web app targeting Chrome on desktop"). Include the current code or design file link if possible. 3. **Specify the Goal:** Tell the AI what you want to achieve (e.g., "Make the button press feel more tactile" or "Review the toast notification animations for a mobile app"). The more specific you are, the better the output. 4. **Iterate:** Use the AI’s suggestions to implement changes. Test the animations in your target environment and refine based on feedback. For code snippets, copy-paste directly into your project and adjust as needed. 5. **Validate:** Use browser dev tools (for web) or Xcode/Simulator (for mobile) to check performance (e.g., 60fps, no jank). Compare the before/after feel to ensure the interaction feels natural. **Tip:** For complex animations, break the task into smaller parts (e.g., start with hover states, then press states, then transitions). Use tools like [CSS Tricks’ Animation Guide](https://css-tricks.com/almanac/properties/t/transition/) or [Framer Motion’s docs](https://www.framer.com/motion/) as references.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rohitg00/pro-workflow/tree/main/skills/design-engineeringCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a design engineer. Review the [COMPONENT/INTERFACE NAME] in [PROJECT/DESIGN TOOL: Figma, Framer, etc.] and suggest improvements for its motion, easing, timing, springs, component feel, and visual foundations. Focus on [SPECIFIC AREA: e.g., hover states, transitions, modal animations, toast notifications]. Provide code snippets in [LANGUAGE: React, CSS, Swift, etc.] if applicable. Include before/after comparisons of the interaction feel. [ADDITIONAL CONTEXT: e.g., target audience, device constraints, performance considerations].
Here’s a review of the **Login Modal** in our SaaS dashboard (built in React with Framer Motion). The current implementation uses a basic fade-in with linear easing, which feels abrupt and lacks polish. The button press state is a static scale, and the modal exit animation is missing entirely.
### **Key Issues Identified:**
1. **Entry Animation:** The modal currently uses `opacity: 0` to `opacity: 1` with `ease: linear` over 300ms. This feels robotic and doesn’t guide the user’s attention. Instead, use a **spring-based easing** (`type: "spring", damping: 25, stiffness: 200`) with a slight y-axis offset (from `-20px` to `0px`) to create a subtle "pop" effect. This mimics natural motion and feels more inviting.
2. **Button Press State:** The login button scales to `1.05` but snaps back instantly. Replace this with a **press-and-release animation** using Framer Motion’s `whileTap` and `transition` props. Example:
```jsx
<motion.button
whileTap={{ scale: 0.98 }}
transition={{ type: "spring", damping: 10, stiffness: 200 }}
>
Login
</motion.button>
```
This creates a tactile feedback loop that reinforces user interaction.
3. **Exit Animation:** The modal currently disappears instantly when closed. Add a **slide-and-fade** effect with `y: -20px` and `opacity: 0` over 250ms using `ease: "easeOut"`. This provides closure and prevents the UI from feeling jarring.
4. **Visual Polish:** The backdrop uses a flat `#00000080` opacity. Replace this with a **subtle blur effect** (`backdropFilter: "blur(4px)"`) to create depth and focus the user’s attention on the modal. Ensure this is supported in the target browsers (e.g., add a fallback for Safari).
### **Before vs. After Comparison:**
- **Before:** The modal snaps into view, buttons feel unresponsive, and the exit is instant. The interaction feels mechanical.
- **After:** The modal "pops" into view with a spring animation, buttons provide tactile feedback, and the exit animation feels deliberate. The backdrop blur creates a modern, layered UI feel.
### **Performance Considerations:**
- Use `will-change: transform` on animated elements to optimize rendering.
- Limit the number of simultaneously animated properties to avoid jank on low-end devices.
- Test the animations on mobile devices to ensure they feel smooth (aim for 60fps).
Would you like me to generate a full code implementation for these changes? Or should we iterate on another component first?skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan