JSFiddle - React, Tailwind, and code Playground

HTML

<div class="sliderWrapper">
          <div>Postal Address&nbsp;&nbsp;</div>
            <label class="switch">
                <input type="checkbox" name="data[SplashPage][firstname]">
                <span class="slider"></span>
            </label>
        </div>
        <div class="sliderWrapper">
            <div>Postal Address&nbsp;&nbsp;</div>
            <label class="switch">
                <input type="checkbox" name="data[SplashPage][lastname]">
                <span class="slider"></span>
            </label>
        </div>

CSS

.sliderWrapper{display: inline-block;margin:24px 24px 24px 24px;postion:relative;}
.sliderWrapper div{display: inline-block;line-height:60px;}
 /* The switch - the box around the slider */
.switch {
  vertical-align: middle;
  position: relative;
  display: inline-block;
  padding:0px;
  width: 54px;
  height: 28px;
}
/* Hide default HTML checkbox */
.switch input {display:none;}
/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d7d7d7;
  -webkit-transition: .4s;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 1px;
  bottom: 1px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}
input:checked + .slider {background-color: #1fb5ad;}
input:focus + .slider {box-shadow: 0 0 1px #1fb5ad;}
input:checked + .slider:before {-webkit-transform: translateX(26px);-ms-transform: translateX(26px);transform: translateX(26px);}