.cb-slidein {
display: inline-flex; align-items: center;
gap: 10px; cursor: pointer; user-select: none;
}
.cb-slidein__input { display: none; }
.cb-slidein__box {
width: 24px; height: 24px; border-radius: 7px;
border: 2px solid rgba(30,217,138,.3);
display: flex; align-items: center;
justify-content: center; flex-shrink: 0;
color: transparent;
transition: background .25s, border-color .25s,
color .25s;
}
.cb-slidein__text {
font-size: 14px; color: #1ed98a;
max-width: 0; overflow: hidden;
white-space: nowrap; opacity: 0;
transition: max-width .4s cubic-bezier(.23,1,.32,1),
opacity .4s ease;
}
.cb-slidein__input:checked + .cb-slidein__box {
background: #1ed98a; border-color: #1ed98a;
color: #fff;
}
.cb-slidein__input:checked ~ .cb-slidein__text {
max-width: 200px; opacity: 1;
} <label class="cb-slidein">
<input class="cb-slidein__input" type="checkbox" checked />
<span class="cb-slidein__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-slidein__text">Done!</span>
</label> Live preview Edit any tab — preview updates live Ready