Shake on Error
On an input error the field shakes and an error message slides out below
This effect uses fixed demo content, so custom text isn’t applied.
Hannah's Motion Library
Web motion effects × AI prompts
AI prompt
On a wrong password at login, the input shakes quickly left and right a few times (like shaking its head no, about 0.45 s, the amplitude growing then shrinking), its border switches to the error color, and an error message below fades and slides in from 4px above; correcting the input restores the border and message. (CSS: keyframes with translateX back and forth from 10% to 90%, cubic-bezier(.36,.07,.19,.97); remove the class and force a reflow before replaying; can pair with phone vibration via navigator.vibrate)
When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.
How to use it
- Tap “Copy AI prompt”.
- Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
- The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.
More form & control effects
346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts
Browse all effects →