Microinteractions
Overview
Microinteractions are small, single-purpose trigger-feedback pairs that confirm an action or communicate a state change through contextual UI changes. Nielsen Norman Group defines the concept; MDN documents CSS transitions, a primary way to implement smooth state feedback. Read this when designing button/hover/focus states, form validation, toggles, loading, or any small "did that work?" moment.
Official sources
Core concepts
- Microinteraction — a trigger-feedback pair where feedback is a narrowly targeted, contextual (usually visual) response to the trigger (NN/g).
- Trigger — what starts it: a user action (click, gesture, voice) or a change in system state (NN/g).
- Feedback — the small, highly contextual UI change that responds to the trigger, often visual, sometimes auditory (NN/g).
- State cues — visible distinctions between default, hover, focus, active, disabled, loading, success, and error states.
- Transitions —
transition smoothly interpolates between state property values over a duration, easing, and optional delay (MDN transition).
Best practices
- Pair every meaningful trigger with immediate, proportionate feedback so the user knows it registered (NN/g).
- Keep microinteractions single-purpose and narrowly targeted rather than bundling multiple effects (NN/g).
- Use CSS transitions for smooth, declarative state changes and list only the properties you intend to animate (MDN transition).
- Cover the full state matrix (hover, focus-visible, active, disabled, loading, error/success) so feedback is complete and accessible.
Common pitfalls
- Transitioning
all → name specific properties to avoid janky, unintended animations (MDN transition).
- Silent triggers with no feedback (e.g., a submit that appears to do nothing) → add an immediate visual response (NN/g).
- Overloading one microinteraction with several effects → keep it focused on a single, contextual response (NN/g).
Examples
/* State cues with a scoped transition */
.btn {
background: var(--bg);
transition: background-color 150ms ease, box-shadow 150ms ease;
}
.btn:hover { background: var(--bg-hover); }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }
.btn[aria-busy="true"] { opacity: .6; cursor: progress; } /* loading cue */
Further reading
Related skills
- ../animation-motion — richer scripted motion via the Web Animations API
- ../ui-ux-principles — "visibility of system status" that feedback fulfills
1---2name: microinteractions3description: Trigger-feedback pairs, state cues, and transitions that confirm actions; consult when designing button states, validation, and small feedback moments.4domain: design5category: design6tags: [microinteractions, feedback, transitions, state, ux]7official_sources:8 - https://www.nngroup.com/articles/microinteractions/9 - https://developer.mozilla.org/en-US/docs/Web/CSS/transition10verified: 2026-06-1611metadata:12 source: https://skillmd.com/skills/gabriel7silva/microinteractions13---1415# Microinteractions1617## Overview18Microinteractions are small, single-purpose trigger-feedback pairs that confirm an action or communicate a state change through contextual UI changes. Nielsen Norman Group defines the concept; MDN documents CSS transitions, a primary way to implement smooth state feedback. Read this when designing button/hover/focus states, form validation, toggles, loading, or any small "did that work?" moment.1920## Official sources21- Nielsen Norman Group — Microinteractions: https://www.nngroup.com/articles/microinteractions/22- MDN — CSS transition: https://developer.mozilla.org/en-US/docs/Web/CSS/transition2324## Core concepts25- **Microinteraction** — a trigger-feedback pair where feedback is a narrowly targeted, contextual (usually visual) response to the trigger (NN/g).26- **Trigger** — what starts it: a user action (click, gesture, voice) or a change in system state (NN/g).27- **Feedback** — the small, highly contextual UI change that responds to the trigger, often visual, sometimes auditory (NN/g).28- **State cues** — visible distinctions between default, hover, focus, active, disabled, loading, success, and error states.29- **Transitions** — `transition` smoothly interpolates between state property values over a duration, easing, and optional delay (MDN transition).3031## Best practices32- Pair every meaningful trigger with immediate, proportionate feedback so the user knows it registered (NN/g).33- Keep microinteractions single-purpose and narrowly targeted rather than bundling multiple effects (NN/g).34- Use CSS transitions for smooth, declarative state changes and list only the properties you intend to animate (MDN transition).35- Cover the full state matrix (hover, focus-visible, active, disabled, loading, error/success) so feedback is complete and accessible.3637## Common pitfalls38- Transitioning `all` → name specific properties to avoid janky, unintended animations (MDN transition).39- Silent triggers with no feedback (e.g., a submit that appears to do nothing) → add an immediate visual response (NN/g).40- Overloading one microinteraction with several effects → keep it focused on a single, contextual response (NN/g).4142## Examples43```css44/* State cues with a scoped transition */45.btn {46 background: var(--bg);47 transition: background-color 150ms ease, box-shadow 150ms ease;48}49.btn:hover { background: var(--bg-hover); }50.btn:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }51.btn[aria-busy="true"] { opacity: .6; cursor: progress; } /* loading cue */52```5354## Further reading55- NN/g microinteractions article: https://www.nngroup.com/articles/microinteractions/56- MDN transition reference: https://developer.mozilla.org/en-US/docs/Web/CSS/transition5758## Related skills59- ../animation-motion — richer scripted motion via the Web Animations API60- ../ui-ux-principles — "visibility of system status" that feedback fulfills