JSFiddle - React, Tailwind, and code Playground

HTML

<form>

    <label for="firstname">Name</label>
    <input type="text" id="firstname" name="firstname" placeholder="First Name" required="required" /><input type="text" id="lastname" name="lastname" placeholder="Last Name" required="required" />

</form>

CSS

form {
  border: 1px solid red;   
}
form label {
    float: left;
    width: 200px;
    display: inline-block;
    padding-left:5px;
}

form input {

    width: 140px;
    height:35px;
    padding:0px 10px;
    margin: 5px 0px;
}

JavaScript

$("#firstname").effect("shake", { times:3 }, 75);

$("#lastname").effect("shake", { times:3 }, 75);