appearance

Utilities for suppressing native form control styling.

2025-04-10

Written by: tdtc

ClassStyles
appearance-noneappearance: none;
appearance-autoappearance: auto;

Removing default appearance

Use appearance-none to reset any browser specific styling on an element:

<select>
  <option>Yes</option>
  <option>No</option>
  <option>Maybe</option>
</select>
<div class="grid">
  <select class="col-start-1 row-start-1 appearance-none bg-gray-50 dark:bg-gray-800 ...">
    <option>Yes</option>
    <option>No</option>
    <option>Maybe</option>
  </select>
  <svg class="pointer-events-none col-start-1 row-start-1 ...">
    <!-- ... -->
  </svg>
</div>

Restoring default appearance

Use appearance-auto to restore the default browser specific styling on an element:

<label>
  <div>
    <input type="checkbox" class="appearance-none forced-colors:appearance-auto ..." />
    <svg class="invisible peer-checked:visible forced-colors:hidden ...">
      <!-- ... -->
    </svg>
  </div>
  Falls back to default appearance
</label>
<label>
  <div>
    <input type="checkbox" class="appearance-none ..." />
    <svg class="invisible peer-checked:visible ...">
      <!-- ... -->
    </svg>
  </div>
  Keeps custom appearance
</label>

This is useful for reverting to the standard browser controls in certain accessibility modes.

Ref