Skip to main content

Tailwind CSS Accent Color Cheatsheet

Complete reference for accent-color utilities - style checkboxes, radio buttons, and range inputs.
Click any card to copy the class name.

What is accent-color?

The accent-color CSS property sets the accent color for user-interface controls generated by form elements. This is one of the easiest ways to brand your form controls without complex custom styling.

Works with:
  • - Checkboxes (<input type="checkbox">)
  • - Radio buttons (<input type="radio">)
  • - Range sliders (<input type="range">)
  • - Progress bars (<progress>)

Special Values

Special accent color utilities for inheritance, transparency, and basic colors.

Color Palette (500 Shades)

Popular accent colors using the 500 shade - great for most use cases.

All Color Scales

Click any checkbox to copy the class name. All Tailwind color shades are available.

slate
gray
zinc
neutral
stone
red
orange
amber
yellow
lime
green
emerald
teal
cyan
sky
blue
indigo
violet
purple
fuchsia
pink
rose

Visual Examples

See how accent colors look on different form controls.

Checkboxes

Radio Buttons

Range Sliders

accent-red-500
accent-blue-500
accent-green-500
accent-purple-500

Progress Bars

accent-red-500
accent-blue-500
accent-green-500
accent-purple-500

Common Use Cases

Basic Checkbox Styling

<input
  type="checkbox"
  class="accent-blue-500"
/>

{/* With label */}
<label class="flex items-center gap-2">
  <input
    type="checkbox"
    class="accent-purple-500 w-5 h-5"
  />
  <span>Accept terms</span>
</label>

Radio Button Group

<div class="space-y-2">
  <label class="flex items-center gap-2">
    <input
      type="radio"
      name="plan"
      class="accent-green-500 w-5 h-5"
    />
    <span>Free Plan</span>
  </label>
  <label class="flex items-center gap-2">
    <input
      type="radio"
      name="plan"
      class="accent-green-500 w-5 h-5"
    />
    <span>Pro Plan</span>
  </label>
</div>

Range Slider

<div>
  <label class="text-sm font-medium">
    Volume: 75%
  </label>
  <input
    type="range"
    min="0"
    max="100"
    value="75"
    class="w-full accent-pink-500"
  />
</div>

Progress Bar

<div>
  <div class="flex justify-between mb-1">
    <span class="text-sm">Upload Progress</span>
    <span class="text-sm">65%</span>
  </div>
  <progress
    value="65"
    max="100"
    class="w-full accent-indigo-500"
  />
</div>

Dark Mode Support

{/* Different colors for light/dark */}
<input
  type="checkbox"
  class="accent-blue-500 dark:accent-blue-400"
/>

{/* Brighter accent in dark mode */}
<input
  type="radio"
  class="accent-emerald-600 dark:accent-emerald-400"
/>

Brand Colors

{/* Using arbitrary values */}
<input
  type="checkbox"
  class="accent-[#1DB954]"
/>

{/* Spotify green */}
<input
  type="radio"
  class="accent-[rgb(29,185,84)]"
/>

Browser Support

The accent-color CSS property has excellent modern browser support.

Chrome
93+
Firefox
92+
Safari
15.4+
Edge
93+

For older browsers, form controls will fall back to their default browser colors.

Frequently Asked Questions

What is the accent-color property in Tailwind CSS?

The accent-color property in Tailwind CSS allows you to customize the color of form controls like checkboxes, radio buttons, and range sliders. It uses the CSS accent-color property under the hood, making it easy to brand form elements without complex custom styling.

Which HTML elements support accent-color?

The accent-color property works with checkboxes (<input type="checkbox">), radio buttons (<input type="radio">), range sliders (<input type="range">), and progress bars (<progress>).

How do I use accent-color in Tailwind CSS?

Simply add an accent-{color} class to your form element. For example, accent-blue-500 will make a checkbox blue when checked. You can use any color from Tailwind's color palette including all shades (50-950).

Does accent-color work in all browsers?

The accent-color CSS property is supported in all modern browsers including Chrome 93+, Firefox 92+, Safari 15.4+, and Edge 93+. For older browsers, the form controls will fall back to their default colors.

Can I use custom colors with accent-color?

Yes! You can use Tailwind's arbitrary value syntax to use any custom color. For example, accent-[#1DB954] for a custom hex color, or accent-[rgb(255,0,100)] for RGB values.

What's the difference between accent-color and background-color for form controls?

The accent-color property specifically targets the browser-rendered UI elements of form controls (like the checkmark in a checkbox), while background-color affects the entire element's background. Using accent-color is the proper way to style native form controls without replacing them with custom elements.