Skip to content
UIGrammer
EN 中文

Animation · Feedback · 07

Shake Error

Shake Error = a field or box that jolts side to side when input is rejected, so the mistake is felt as well as read.

Skip to the modify prompt

Invalid input

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.

See also

Add a shake to an invalid field: translateX +/-5px three times over 0.4s ease-out, transform only, plays once per submit error.