.cb-strike {
display: inline-flex; align-items: center;
gap: 10px; cursor: pointer; user-select: none;
}
.cb-strike__input { display: none; }
.cb-strike__box {
width: 22px; height: 22px; border-radius: 50%;
border: 2px solid rgba(255,255,255,.2);
background: rgba(255,255,255,.05);
display: flex; align-items: center;
justify-content: center; flex-shrink: 0;
color: transparent; overflow: hidden;
transition: background .25s, border-color .25s,
color .25s;
}
.cb-strike__box svg {
transform: scale(0);
transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.cb-strike__text {
position: relative; transition: color .3s;
font-size: 14px;
}
.cb-strike__text::after {
content: ""; position: absolute;
left: 0; top: 50%; width: 0; height: 1.5px;
background: #7c6cff;
transition: width .35s cubic-bezier(.23,1,.32,1);
}
.cb-strike__input:checked + .cb-strike__box {
background: #7c6cff; border-color: #7c6cff;
color: #fff;
}
.cb-strike__input:checked + .cb-strike__box svg {
transform: scale(1);
}
.cb-strike__input:checked ~ .cb-strike__text {
color: rgba(255, 255, 255, 0.55);
}
.cb-strike__input:checked ~ .cb-strike__text::after {
width: 100%;
} <label class="cb-strike">
<input class="cb-strike__input" type="checkbox" checked />
<span class="cb-strike__box">
<svg width="12" height="9" viewBox="0 0 14 11" fill="none">
<polyline
points="1,5.5 5,9.5 13,1"
stroke="white"
stroke-width="2.2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</span>
<span class="cb-strike__text">Strikethrough label</span>
</label> Live preview Edit any tab — preview updates live Ready