.gsui-switch { .title { font-size: $font-size-base; margin-right: 10px; } .desc { color: #687078; padding: 2px 0 6px 0; } .react-switch-checkbox { height: 0; width: 0; visibility: hidden; display: none; } .react-switch-label { margin-bottom: -5px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; width: 40px; height: 22px; background: grey; border-radius: 40px; position: relative; transition: background-color 0.2s; } .react-switch-label .react-switch-button { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 18px; transition: 0.2s; background: #fff; box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29); } .react-switch-checkbox:checked + .react-switch-label .react-switch-button { left: calc(100% - 2px); transform: translateX(-100%); } }