Trigger
User action or system state starts the interaction.
Micro-interactions are tiny feedback moments that make an interface feel cared for: a button press, a saved state, a nav underline, a field confirmation.
.button:active { transform: translateY(1px); }
.button[data-state="saved"]::after { content: "Saved"; }
Motion mental model
A micro-interaction is a small response to a user action or system state. It can confirm, guide, prevent mistakes or simply make the product feel more tangible.
Examples include a button pressing down, an underline filling on hover, a field showing valid state, a card revealing an action or a save badge changing state.
The best micro-interactions are nearly invisible until they are missing. They support the task instead of begging for attention.
User action or system state starts the interaction.
The UI answers with a visual change.
Short and intentional motion keeps the response crisp.
The interaction should not hide errors or trap users.
Visual model
The user presses a control.
The button moves one or two pixels.
The interface shows success or progress.
The component returns to a usable state.
Good CSS versus fragile CSS
.button { transition: transform 120ms ease, box-shadow 120ms ease; }
.button:active { transform: translateY(1px); box-shadow: none; }
.button[data-state="saved"]::after { content: "Saved"; }
.button:hover {
animation: wobble .5s linear infinite;
letter-spacing: .4em;
}
Rules of thumb
A micro-interaction should confirm, guide, prevent or clarify.
Tiny interactions usually need tiny durations.
Data attributes and aria states can describe what changed.
Small feedback should not push content around.
Micro-interactions should not be mouse-only.
If the user notices the animation more than the task, pull it back.
Production thinking
Micro-interactions are where craft becomes visible. They make a site feel premium because the interface answers the user with precision.
Micro-interactions still need focus-visible, reduced-motion behavior and state text when the state matters.
Document common interaction patterns so every button, card and nav item does not invent a new personality.
Micro-interactions support engagement and conversion, but the content and structure must still stand on their own.
Live code lab
The preview runs in an isolated iframe. Links and forms stay inside the practice area, so you can experiment without leaving the lesson.
Mini assignment
Practice assignment
Try it yourself
Self-check
Answer these questions before moving on. If the motion has no purpose, no fallback or no state clarity, it is not production motion yet.
Senior audit upgrade
A micro-interaction should confirm state, guide attention or reduce uncertainty. If it only shows off, it is probably noise.
A button depresses slightly, focus is clear, a success message appears quickly.
A card jumps, text shifts, animation blocks input or repeats forever.
If users must wait for the flourish, the flourish is too heavy.
Chapter project
Use transitions, transforms, keyframes, focus states and reduced motion without creating visual noise.
a small interaction pass for buttons, navigation and feedback messages
What does each motion cue explain to the user?