con un clic
micro-interactions
Rules for crafting high-fidelity, physics-based micro-interactions.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Rules for crafting high-fidelity, physics-based micro-interactions.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | micro-interactions |
| description | Rules for crafting high-fidelity, physics-based micro-interactions. |
When building interactive UI components, apply these rules to ensure "feel," continuity, and responsiveness.
press (active state).scale for press states.
scale: 0.98 or 0.96.scale: 0.9.whileTap in Motion or active:scale-* in Tailwind.focus-visible).spring over tween for physical interactions (drag, scale, layout).{ stiffness: 400, damping: 25 }{ stiffness: 300, damping: 30 }{ type: "spring", stiffness: 500, damping: 30, mass: 1 }layout prop in motion/react when an element changes position or size in the document flow.layoutId when an element logically moves between two different sub-trees (e.g., a list item expanding into a detail view).layout="position" if only the position changes, to avoid distorted scale transforms on children.<AnimatePresence mode="popLayout"> to prevent layout jumps.duration: 0.3s to 0.5s (allow eye to track).duration: 0.15s to 0.2s (get out of the way).staggerChildren for lists (> 3 items).
0.05s - 0.1s (keep it tight).opacity + y (or scale) for standard entrances. Avoid x axis unless lateral movement is implied.transition-all duration-200 ease-out.hover:bg-opacity-80 or hover:brightness-110 > changing HSL values manually.height or width with CSS (causes reflow); use Framer Motion layout or ResizeObserver techniques if needed.prefers-reduced-motion.const shouldReduce = useReducedMotion();
const transition = shouldReduce ? { duration: 0 } : { type: "spring" };
<motion.button
whileHover={{ scale: 1.02 }}
whileTap={{ scale: 0.95 }}
transition={{ type: "spring", stiffness: 400, damping: 17 }}
>
{isSelected && (
<motion.div
layoutId="active-pill"
className="absolute inset-0 bg-black rounded-full"
transition={{ type: "spring", bounce: 0.2, duration: 0.6 }}
/>
)}