.cb-liquid {
display: inline-flex; align-items: center;
gap: 10px; cursor: pointer; user-select: none;
}
.cb-liquid__input { display: none; }
.cb-liquid__box {
width: 24px; height: 24px; border-radius: 7px;
border: 2px solid rgba(61,232,245,.4);
position: relative; overflow: hidden;
display: flex; align-items: center;
justify-content: center; color: transparent;
transition: border-color .3s, color .3s;
}
.cb-liquid__fill {
position: absolute; inset: 0;
background: linear-gradient(180deg,
#3de8f5, #06b6d4);
transform: scaleY(0);
transform-origin: bottom;
transition: transform .35s
cubic-bezier(.23,1,.32,1);
}
.cb-liquid__input:checked + .cb-liquid__box {
border-color: #3de8f5; color: #fff;
}
.cb-liquid__input:checked
+ .cb-liquid__box .cb-liquid__fill {
transform: scaleY(1);
} <label class="cb-liquid">
<input class="cb-liquid__input" type="checkbox" checked />
<span class="cb-liquid__box">
<span class="cb-liquid__fill"></span>
<svg
width="12"
height="9"
viewBox="0 0 14 11"
fill="none"
style="position: relative; z-index: 1"
>
<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>Liquid fill checkbox</span>
</label> Live preview Edit any tab — preview updates live Ready