Wiggle relevant elements when the user does the wrong thing twice (e.g. submitting a form with validation errors twice)
const { scope: wiggleRef, wiggle } = useWiggle();
const handleSubmit = () => {
if (errors) {
wiggle();
return;
}
}
<span ref={wiggleRef} className="inline-flex">
<Button type="submit" variant="primary" disabled={pending}>
Save address
</Button>
</span>