JSFiddle - React, Tailwind, and code Playground

HTML

<div role="switch" aria-checked="false" aria-readonly="true" tabindex="0">
  <span class="label">Notifications</span>
  <span class="switch">
    <span></span>
  </span>
  <span class="on" aria-hidden="true">On</span>
  <span class="off" aria-hidden="true">Off</span>
</div>