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.
<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
| Class | CSS declarations |
|---|---|
accent-black | accent-color: #000; |
accent-white | accent-color: #fff; |
accent-neutral-600 | accent-color: oklch(0.56 0 0); |
accent-current | accent-color: currentColor; |
accent-[auto] | accent-color: auto; |
View full generated 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;
}