CSS Checkbox Generator
Design custom CSS checkboxes — style color, size, radius, and border with a live preview.
Live preview
HTML
<input type="checkbox" class="my-checkbox" checked>CSS
.my-checkbox {
appearance: none;
-webkit-appearance: none;
width: 24px;
height: 24px;
border: 2px solid #d1d5db;
border-radius: 6px;
background: #ffffff;
cursor: pointer;
vertical-align: middle;
transition: all 0.2s ease;
}
.my-checkbox:hover {
border-color: #9ca3af;
}
.my-checkbox:checked {
border-color: #22c55e;
background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12 10 18 20 6'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.my-checkbox:focus-visible {
outline: 2px solid #22c55e;
outline-offset: 2px;
}