Micro-interactions

Mood track «Getting it Done» · Kevin MacLeod incompetech.com · licensed under Creative Commons BY 4.0
Example image of the style Micro-interactions
Preview built in HTML and CSS in this style

Micro-interazioni · Microinteracciones

Tiny animations that answer a user action, like a bursting like, a snapping toggle or a pressed button. They give feedback and personality.

Era
2013 – today
Use
Mainstream
Domain
Web / UIMotion
Mood
playfulsubtleclean
Explore

Live demo

View code
<div class="row">
  <label class="like"><input type="checkbox" aria-label="Mi piace"><span aria-hidden="true">♥</span></label>
  <label class="tg"><input type="checkbox" role="switch" aria-label="Notifiche"><i></i></label>
  <button class="press">Invia</button>
  <b class="cursor" aria-hidden="true"></b>
</div>
<script>
  // Al primo tocco, clic o tasto la demo smette di animarsi da sola e risponde ai controlli veri.
  const row=document.querySelector('.row');
  const manual=()=>row.classList.add('manual');
  row.addEventListener('pointerdown',manual,{once:true});
  row.addEventListener('keydown',manual,{once:true});
</script>
body{background:#F4F4F7;display:grid;place-items:center;font-family:Inter,sans-serif;margin:0;min-height:100vh}
.row{display:flex;gap:36px;align-items:center;position:relative}
label{position:relative}
input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
input:focus-visible+span,input:focus-visible+i{outline:2px solid #1B1B1F;outline-offset:4px}
.like span{display:block;font-size:44px;color:#c7c7cc;cursor:pointer;transition:color .2s}
.like input:checked+span{color:#FF3B5C}
.tg i{display:block;width:56px;height:32px;border-radius:16px;background:#d1d1d6;position:relative;cursor:pointer;transition:background .25s}
.tg i::after{content:'';position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 2px 4px #0003;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}
.tg input:checked+i{background:#34C759}.tg input:checked+i::after{transform:translateX(24px)}
.press{font:600 16px Inter;border:0;border-radius:12px;padding:12px 24px;background:#1B1B1F;color:#fff;cursor:pointer;transition:transform .12s;position:relative;overflow:hidden}
.press:active{transform:scale(.94)}
.cursor{position:absolute;left:0;top:0;width:18px;height:18px;border-radius:50%;background:#1B1B1F33;border:2px solid #1B1B1F;box-shadow:0 0 0 2px #fff;pointer-events:none;opacity:0}
@media (prefers-reduced-motion:no-preference){
  /* Ciclo automatico di 6 s: un cursore finto tocca cuore, interruttore e pulsante, poi tutto torna com'era. */
  .like span{animation:heart 6s cubic-bezier(.34,1.56,.64,1) infinite}
  .tg i{animation:track 6s ease infinite}
  .tg i::after{animation:knob 6s cubic-bezier(.34,1.56,.64,1) infinite}
  .press{animation:press 6s ease infinite}
  .press::after{content:'';position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px;border-radius:50%;background:#fff6;transform:scale(0);animation:ripple 6s ease-out infinite}
  .cursor{animation:cursor 6s cubic-bezier(.45,0,.2,1) infinite}
  .row.manual *,.row.manual .tg i::after,.row.manual .press::after{animation:none}
  .row.manual .like input:checked+span{animation:pop .45s cubic-bezier(.34,1.56,.64,1)}
}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(.7)}100%{transform:scale(1)}}
@keyframes cursor{
  0%{opacity:0;transform:translate(10px,40px)}
  8%{opacity:1;transform:translate(13px,14px)}
  12%{transform:translate(13px,14px) scale(.7)}
  16%,30%{transform:translate(13px,14px) scale(1)}
  38%{transform:translate(100px,8px)}
  42%{transform:translate(100px,8px) scale(.7)}
  46%,58%{transform:translate(100px,8px) scale(1)}
  66%{transform:translate(200px,12px)}
  70%{transform:translate(200px,12px) scale(.7)}
  74%,86%{opacity:1;transform:translate(200px,12px) scale(1)}
  94%,100%{opacity:0;transform:translate(230px,50px)}}
@keyframes heart{0%,11%{color:#c7c7cc;transform:scale(1)}14%{color:#FF3B5C;transform:scale(.7)}20%{transform:scale(1.25)}26%,90%{color:#FF3B5C;transform:scale(1)}96%,100%{color:#c7c7cc}}
@keyframes track{0%,41%{background:#d1d1d6}45%,90%{background:#34C759}96%,100%{background:#d1d1d6}}
@keyframes knob{0%,41%{transform:translateX(0)}47%,90%{transform:translateX(24px)}96%,100%{transform:translateX(0)}}
@keyframes press{0%,69%{transform:scale(1)}71%{transform:scale(.92)}75%,100%{transform:scale(1)}}
@keyframes ripple{0%,70%{transform:scale(0);opacity:1}82%{transform:scale(14);opacity:0}100%{transform:scale(0);opacity:0}}

Characteristics

  • Short durations (100–300 ms)
  • Easing with slight overshoot
  • One purpose per animation
  • Clear states (hover / active / done)
  • Instant feedback

Palette

Click a swatch to copy it

Typography

Headings · Inter Micro-interactions

Body · Inter Tiny animations that answer a user action, like a bursting like, a snapping toggle or a pressed button. They give feedback and personality.

Motion

Easing
cubic-bezier(0.34, 1.56, 0.64, 1)
Typical duration
120–300 ms
Techniques
CSS transitions, CSS keyframes, Web Animations API, Lottie, Rive

Accessibility (reduced motion)

Keep the state change (colour, icon) but drop scaling, bounces and particles.

Prompt for your agent

Copy and paste into your prompt to have an agent or image generator reproduce this style.

For web pages and UI

Design the web page or interface in this style: Micro-interactions (Micro-interazioni, Microinteracciones).
Tiny animations that answer a user action, like a bursting like, a snapping toggle or a pressed button. They give feedback and personality.
Characteristics: Short durations (100–300 ms), Easing with slight overshoot, One purpose per animation, Clear states (hover / active / done), Instant feedback.
Palette: #FF3B5C, #FFFFFF, #F4F4F7, #1B1B1F, #34C759.
Typography: headings in Inter, body text in Inter (Google Fonts or equivalents).
Mood: playful, subtle, clean.
Motion: easing cubic-bezier(0.34, 1.56, 0.64, 1), typical duration 120–300 ms; techniques: CSS transitions, CSS keyframes, Web Animations API, Lottie, Rive.
With prefers-reduced-motion: Keep the state change (colour, icon) but drop scaling, bounces and particles.
References: Dan Saffer «Microinteractions» (2013), like di Twitter / X, LottieFiles.

Relations

Derives from: Spring PhysicsSpring PhysicsInfluenced: AccordionAccordionInfluenced: Drag to reorderDrag to reorderInfluenced: Like burstLike burstInfluenced: Magnetic buttonMagnetic buttonInfluenced: Physics DragPhysics DragInfluenced: Pull to refreshPull to refreshInfluenced: Animated theme toggleAnimated theme toggleInfluenced: Stacked toast notificationsStacked toast notificationsInfluenced: Pop-up tooltipPop-up tooltipSimilar to: Animated iconsAnimated iconsSimilar to: ConfettiConfettiSimilar to: Custom CursorCustom CursorSimilar to: Creative 404 pageCreative 404 pageSimilar to: Link Hover UnderlineLink Hover UnderlineSimilar to: Lottie / RiveLottie / RiveSimilar to: Skeleton LoadingSkeleton LoadingSimilar to: Multi-step formMulti-step formSimilar to: Ripple EffectRipple EffectSimilar to: Speed dial buttonSpeed dial buttonSimilar to: Squash & StretchSquash & StretchMicro-interactions
Derives fromInfluencedSimilar toSee in the graph →

References

  • Dan Saffer «Microinteractions» (2013)
  • like di Twitter / X
  • LottieFiles