JSFiddle - React, Tailwind, and code Playground
by maccman
HTML
<div class="clipped">
<div class="clip"></div>
<input type="text"></div>
</div>
CSS
body {
margin: 100px;
}
.clipped {
position: relative;
width: 154px;
}
.clipped .clip {
position: absolute;
right: 0px;
width: 50px;
height: 25px;
border: 2px solid #CCC;
border-radius: 0 4px 4px 0;
border-left: 0px;
pointer-events: none;
}
input {
-webkit-transition: -webkit-transform 400ms ease;
border: 2px solid #CCC;
border-radius: 4px;
border-right: 0px;
height: 25px;
width: 150px;
}
input:focus {
-webkit-transform: translate3d(-40px, 0, 0);
outline: none;
}