Skip to main content

Generator Checkbox CSS

Buat checkbox CSS kustom dengan editor visual. Sesuaikan animasi, warna, dan bentuk secara bebas.

#6366f1
#ffffff
#d1d5db

Pratinjau

Kode HTML

<label class="custom-checkbox">
    <input type="checkbox" />
    <span class="checkmark"></span>
    Label text
</label>

Kode CSS

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: relative;
    height: 24px;
    width: 24px;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox:hover .checkmark {
    border-color: #6366f1;
}

.custom-checkbox input:checked + .checkmark {
    background-color: #6366f1;
    border-color: #6366f1;
}

.custom-checkbox .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked + .checkmark::after {
    display: block;
}
Bagikan alat ini
📖

Cara Menggunakan

Step 1

Pilih Desain

Pilih Desain

Pilih template desain checkbox

Step 2

Sesuaikan

Sesuaikan

Sesuaikan warna, ukuran, radius sudut, animasi, dll.

Step 3

Salin Kode

Salin Kode

Salin kode HTML/CSS

Fitur

Pratinjau Real-time

Pratinjau kustomisasi secara real-time

Template yang Kaya

Template dengan berbagai animasi: centang, geser, pantul, dll.

Aksesibel

Menghasilkan kode yang ramah pembaca layar dengan struktur HTML semantik

FAQ

Checkbox default browser yang diberi gaya ulang dengan desain CSS kustom.