Preview
HTML
<label>
<input type="checkbox" checked>
<span>Alerts</span>
</label>
CSS
:root {
--ink: #241c16;
--paper: #fffaf1;
--accent: #d4552b;
--accent-2: #4338ca;
--on-accent: #fff;
--muted: #6a6156;
--line: #d7ccb8;
--chip: #efe6d6;
}
label {
display: inline-flex;
align-items: center;
gap: 0.7rem;
font-weight: 650;
}
input {
appearance: none;
width: 2.6rem;
height: 1.45rem;
margin: 0;
border-radius: 999px;
background: var(--line);
}
input::before {
content: "";
display: block;
width: 1.15rem;
height: 1.15rem;
margin: 0.15rem;
border-radius: 50%;
background: var(--paper);
transition: transform 160ms ease;
}
input:checked {
background: var(--ink);
}
input:checked::before {
transform: translateX(1.15rem);
}