JSFiddle - React, Tailwind, and code Playground

by 2Yootz

HTML

<div id="loader-wrapper">

  <div id="loader">
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
  </div>
</div>

CSS

#loader {
  display: block;
  position: relative;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #3498db;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
  z-index: 1001;
}

#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

#loader-wrapper .loader-section {
    position: fixed;
    top: 0;
    width: 51%;
    height: 100%;
    background: #eceff1;
    z-index: 1000;
}
#loader-wrapper .loader-section.section-right {
    right: 0;
        transform: translateX(100%);
        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#loader-wrapper .loader-section.section-left {
    left: 0;
        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}