appearance

Class Description

appearance-none

Removes native browser styling from form elements. Required for custom inputs and selects.

CSS Rules

.appearance-none {
  appearance: none;
}

Usage

<element class="appearance-none" />

Responsive

Prefix .appearance-none utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:appearance-none" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="appearance-none:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="appearance-none:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before appearance-none::before" />

<element class="content-after appearance-none::after" />
.appearance-none Removes native browser styling from form elements. Required for custom inputs and selects.

appearance-auto

Restores the default platform-native styling to form controls.

CSS Rules

.appearance-auto {
  appearance: auto;
}

Usage

<element class="appearance-auto" />

Responsive

Prefix .appearance-auto utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:appearance-auto" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="appearance-auto:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="appearance-auto:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before appearance-auto::before" />

<element class="content-after appearance-auto::after" />
.appearance-auto Restores the default platform-native styling to form controls.