Respects prefers-reduced-motion: the animation is disabled and the final state is shown.
What is a Shake Error?
A shake is the universal 'no'. When a form rejects input, the field jolts left and right a few times so the error is felt, not just labelled. Keep it under 0.4s and a few pixels — a big shake reads as anger. Always pair it with a visible error message; motion alone is not accessible.
Animation Specimen
Trigger
click
Tech
css
Duration
1.6s
Easing
ease-in-out
Performance
transform
When to use
Invalid password, wrong code, failed submit
Any field that must reject input visibly
Avoid when
On every keystroke — it punishes typing
Without a text error — motion alone fails accessibility
Shake once per error event, not per keystroke, or it feels like the field is fighting the user.