Browse documentation

Reference / Interactivity

Accent color

Apply a theme color to the accent of native controls including checkboxes, radio buttons, and range inputs.

Working example

The browser draws the selected indicator. Give radio choices in a single group the same name to preserve arrow-key navigation.

HTML
<fieldset class="space-x-3">
  <legend class="mb-2 font-semibold">Cover finish</legend>
  <label><input type="radio" name="cover-finish" class="accent-black" checked> Matte</label>
  <label><input type="radio" name="cover-finish" class="accent-black"> Gloss</label>
</fieldset>

Class reference

ClassCSS declarations
accent-blackaccent-color: #000;
accent-whiteaccent-color: #fff;
accent-neutral-600accent-color: oklch(0.56 0 0);
accent-currentaccent-color: currentColor;
accent-[auto]accent-color: auto;
View full generated CSS
Compiled CSS
.accent-\[auto\] {
  accent-color: auto;
}
.accent-black {
  accent-color: #000;
}
.accent-current {
  accent-color: currentColor;
}
.accent-neutral-600 {
  accent-color: oklch(0.56 0 0);
}
.accent-white {
  accent-color: #fff;
}