Browse documentation

Reference / Interactivity

Native appearance

Use the platform’s control styling or remove it before supplying your own visual affordance.

Working example

The select keeps its native keyboard behavior. Restore its platform appearance in forced colors so the selection affordance stays visible.

HTML
<label class="block">Paper stock
  <span class="relative mt-1 inline-block">
    <select class="appearance-none rounded border bg-white py-2 pl-3 pr-8 forced-colors:appearance-auto">
      <option>Uncoated</option><option>Coated</option>
    </select>
    <svg aria-hidden="true" focusable="false" class="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 forced-colors:hidden"
      width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
      <path d="m6 9 6 6 6-6"/>
    </svg>
  </span>
</label>

Class reference

ClassCSS declarations
appearance-autoappearance: auto;
appearance-noneappearance: none;
forced-colors:appearance-autoappearance: auto;
View full generated CSS
Compiled CSS
.appearance-auto {
  appearance: auto;
}
.appearance-none {
  appearance: none;
}
@media (forced-colors: active) {
  .forced-colors\:appearance-auto {
    appearance: auto;
  }
}