JSFiddle - React, Tailwind, and code Playground

by Shailesh Singh

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<div class="wrapper">
<a href="#" class="button">Test</a>
<form action="">
            <input type="text" placeholder="Email">
            <button type="submit">try</button>
          </form>
</div>

CSS

/* Chrome, Safari, Opera */
@-webkit-keyframes example {
    0%   {left:100%; top:0px;}  
    100% {left:0px; top:0px;}
}
a.button {
      font-size: 18px;
    background-color: lightblue;
    width: 222px;
    text-align: center;
    height: 44px;
    line-height: 40px;
    text-transform: uppercase;
    display: inline-block;
    font-weight: 700;
    margin-top: 107px;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
}
form {
      float: left;
    position: relative;
    margin-top: 107px;
    display: none;
   
     -webkit-animation-name: example; /* Chrome, Safari, Opera */
    -webkit-animation-duration: 4s; /* Chrome, Safari, Opera */
    -webkit-animation-delay: 0s; /* Chrome, Safari, Opera */
}
input {
    float: left;
    width: 284px;
    height: 44px;
    padding-left: 63px;
    padding-right: 5px;
    border: none;
    color: #767676;
    font-size: 13px;
    background-color: lighgrey;
}
button {
     width: 170px;
    height: 44px;
    border: 0;
    text-transform: uppercase;
    color: #fff;
    font-size: 16px;
    background-color: lighblue;
}
.hidden-btn {
  margin-left: 20%;
}

JavaScript

$('a.button').click(function() {
    $(this).addClass('hidden-btn');
    setTimeout(function(){
     $('a.button').hide();
    }, 200)
 
    $('form').fadeIn('slow');
    $('input').focus();
  });