JSFiddle - React, Tailwind, and code Playground

by kornim

HTML

<div class="clipped">
<div class="clip"></div>
<input type="text"></input>
</div>

CSS

body {
  margin:100px 200px 0;
}

.clipped {
  position: relative;
  width: 104px;
}

.clipped .clip {
  position: absolute;
  right: 0px;
  width: 90px;
  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 0 0 4px;
  border-right: 0px;
  height: 25px;
  width: 100px;
}

input:focus {
  -webkit-transform: translate3d(-80px, 0, 0);
  outline: none;
}