CSS accent-color for Checkboxes, Radios, and Range Inputs

Styling form controls without rebuilding them

The old way was appearance: none plus dozens of lines to rebuild the control. accent-color changes the native control color in one property.

Old way 20+ lines
input[type="checkbox"]   {  appearance: none;  width: 1.25rem;  height: 1.25rem;  border: 2px solid ...;  background: ...;  border-radius: ...;}
Modern
3 lines
input[type="checkbox"],input[type="radio"]   {  accent-color: #7c3aed;}
Widely available Since 2022 93% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.

Safe to use without fallbacks.

93+
92+
15.4+
93+
native controls, one property
accent-color: var(--accent);

One property

Set the accent color. Checkboxes, radios, range, and progress use it. No rebuild.

Native behavior kept

Focus, keyboard, and screen reader behavior stay intact. You only change the color.

Theme friendly

Use a custom property. Dark mode or theme switch updates controls automatically.

Lines Saved
20+ → 3
85%+ less code
Old Approach
appearance: none
Rebuild from scratch
Modern Approach
accent-color
Native control, one property

How it works

To style checkboxes and radios you used to set appearance: none and then rebuild the control with width, height, border, background, border-radius, and :checked states. Dozens of lines and you had to handle focus and accessibility yourself.

accent-color tells the browser which color to use for the control's accent (check mark, radio dot, range thumb). The control stays native, so focus and keyboard behavior are unchanged. One line, theme-aware if you use a variable.

ESC