CSS Checkbox Generator screenshot

CSS Checkbox Generator

Style a real checkbox in CSS with a custom tick, accent colour, radius and focus ring. The input keeps its keyboard and form behaviour.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the CSS checkbox generator does

This styles a real input[type=checkbox] with appearance:none, so the control keeps its keyboard behaviour, its form value and its accessible role while the visible box is drawn in CSS. The tick is a rotated ::after border, which means no image, no font and no JavaScript. The accent colour fills the checked box and the focus ring; the tick flips to dark on a light accent so it stays visible. One limitation is worth knowing before you paste it: forced-colors mode repaints a custom control with the system palette, replacing both the accent and the tick colour, and some print stylesheets drop custom backgrounds unless print-color-adjust is set.

How to use it

The CSS Checkbox Generator page needs no pasted input: set Box size (px), default "20", Accent colour (default "#2563eb"), Corner radius (px), default "4" and Label colour (default "#111827"), then press Run to build a new CSS.

Worked example

Input:


Output:

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font: inherit;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid rgba(37, 99, 235, 0.55);
  border-radius: 4px;
  background: #ffffff;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.checkbox input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  box-sizing: border-box;
  width: 30%;
  height: 55%;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease;
}

.checkbox input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #2563eb;
}

.checkbox input[type="checkbox"]:checked::after {
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.checkbox input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

This styles a real input[type=checkbox] with appearance:none, so the control keeps its keyboard behaviour, its form value and its accessible role while the visible box is drawn in CSS. The tick is a rotated ::after border, which means no image, no font and no JavaScript. The accent colour fills the checked box and the focus ring; the tick flips to dark on a light accent so it stays visible. One limitation is worth knowing before you paste it: forced-colors mode repaints a custom control with the system palette, replacing both the accent and the tick colour, and some print stylesheets drop custom backgrounds unless print-color-adjust is set.

Style a real checkbox in CSS with a custom tick, accent colour, radius and focus ring. The input keeps its keyboard and form behaviour.

How to use it

The CSS Checkbox Generator page needs no pasted input: set Box size (px), default "20", Accent colour (default "#2563eb"), Corner radius (px), default "4" and Label colour (default "#111827"), then press Run to build a new CSS.

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

What to Expect

What this tool keeps

  • The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Sample output

.checkbox { display: inline-flex; align-items: center; gap: 10px; color: #111827; font: inherit; cursor: pointer; } .checkbox input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; box-sizing: border-box; width: 20px; height: 20px; margin: 0; border: 2px solid rgba(37, 99, 235, 0.55); border-radius: 4px; background: #ffffff; display: inline-block; vertical-align: middle; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; } .checkbox input[type="checkbox"]::after { content: ""; position: absolute; left: 50%; top: 50%; box-sizing: border-box; width: 30%; height: 55%; border-right: 2px solid #ffffff; border-bottom: 2px solid #ffffff; transform: translate(-50%, -50%) rotate(45deg) scale(0); transform-origin: center; transition: transform 0.12s ease; } .checkbox input[type="checkbox"]:checked { background: #2563eb; border-color: #2563eb; } .checkbox input[type="checkbox"]:checked::after { transform: translate(-50%, -50%) rotate(45deg) scale(1); } .checkbox input[type="checkbox"]:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; } .checkbox input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }

Frequently asked questions

How do I use the css checkbox generator?

The CSS Checkbox Generator page needs no pasted input: set Box size (px), default "20", Accent colour (default "#2563eb"), Corner radius (px), default "4" and Label colour (default "#111827"), then press Run to build a new CSS.

Is my input uploaded?

Nothing is uploaded. The result is produced on this page.

Is there a size limit?

No: nothing is pasted, so there is no input size to exceed.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.