1 minute read · design
Micro-interactions communicate system status and make interfaces feel responsive and alive.
Button Feedback
.btn {
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,92,246,0.3); }
.btn:active { transform: translateY(0); box-shadow: none; }Loading States
<button disabled={isLoading}>
{isLoading ? <Spinner className='animate-spin' /> : 'Submit'}
</button>Success Feedback
After a form submission show a checkmark animation before redirecting. 300ms is the sweet spot.
Error Shake
@keyframes shake {
0%,100% { transform: translateX(0); }
20%,60% { transform: translateX(-6px); }
40%,80% { transform: translateX(6px); }
}
.error { animation: shake 0.4s ease; }Conclusion
Micro-interactions are the difference between a UI that feels built and one that feels designed.