Keyframes that swing translateX back and forth on a short cycle. Keep the amplitude small (4–10px) and the whole thing brief (0.3–0.5s) — long or large and it reads as broken rather than "try again."
Used for a wrong password on a login form, a failed payment, a missing required field — anywhere the user's action was rejected. The wiggle alone doesn't say what went wrong, so always pair it with an actual error message.
When to use
Play it once and stop — never loop it. Shaking continuously while an error persists just annoys people.