JSFiddle - React, Tailwind, and code Playground

by lucaslazaro

HTML

<div class="test" style="overflow: hidden; width: 650px; height: 350px; background: #CCC; position: relative;">
  <div class='control' tabindex='1'>
    <div class='btn'></div>
    <i class="icon-search ion-search" style="
    
      
    
"></i>
  </div>
  <i class='icon-close ion-ios-close-empty'>CLOSE</i>
</div>

CSS

.test.mode-search .icon-close {
  opacity: 1;
  transform: none;
  pointer-events: all;
}
.test.mode-search .control .icon-search {
  opacity: 0;
}
.test.mode-search .control .btn {
  transform: scale(70);
}
.icon-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: #FFF;
    font-size: 80px;
    opacity: 0;
    transform: translate(10px, 0) rotate(90deg);
    transition: all 0.3s ease-in-out;
}
.control {
  width: 64px;
  height: 64px;
  position: absolute;
  bottom: 2%;
  right: 2%;
  cursor: pointer;
}
.control .icon-search,
.control .icon-close {
  transition: 0.2s ease-in-out;
}
.control:hover .btn {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}

/* Button */
.btn {
  width: 64px;
  height: 64px;
  border-radius: 100%;
  box-sizing: border-box;
  padding: 20px;
  background: #e91e63;
  outline: 0;
  transform-origin: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-search {
  background-image: url(https://cdn4.iconfinder.com/data/icons/wirecons-free-vector-icons/32/add-128.png);
  background-size: 100%;
  width: 55px;
  height: 55px;
  position: absolute;
  left: 10%;
  top: 8%;
  outline: none;
  
}