← All tools

CSS Checkbox Generator

Style native checkboxes with independent border, fill and check-mark options.

css-checkbox-generatorLOCAL WORKSPACE

Enabling local controls…

Tool settings

Settings stay on this page. Reloading restores the defaults.

Feature reference checked 2026-11-21 · ZeroServer

Live preview and export

CSS

.checkbox-label {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  cursor: pointer;
  min-height: 44px;
}

.custom-checkbox {
  appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid #64748b;
  border-radius: 3px;
  background-color: transparent;
  cursor: pointer;
}

.custom-checkbox:checked {
  background-color: #0e7490;
  border-color: #0e7490;
}

.custom-checkbox:checked::after {
  content: "";
  box-sizing: content-box;
  width: 4px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: translateY(-12%) rotate(45deg);
}

.custom-checkbox:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .custom-checkbox { appearance: auto; }
  .custom-checkbox::after { display: none; }
}

HTML

<label class="checkbox-label"><input class="custom-checkbox" type="checkbox"><span>Checkbox label</span></label>

How to use this tool

Choose a preset or edit the controls. Compare the live preview, then copy or download the styles and any available markup.

When not to use it

Verify contrast, placement and browser behavior in the component that will use the exported styles.