Browse documentation

Reference / Transitions & animation

Transition delay

Start a transition after a pause. A negative delay starts partway through the transition.

Working example

The delay is applied in both directions when it lives on the base element. Put it on a state variant if only that change should wait.

HTML
<label class="block">
  <input type="checkbox" class="peer accent-black"> Reveal the second pass
  <span class="mt-2 block h-2 w-16 bg-black opacity-25 transition-opacity delay-150 duration-300 peer-checked:opacity-100"></span>
</label>

Class reference

ClassCSS declarations
delay-0transition-delay: 0ms;
delay-75transition-delay: 75ms;
delay-150transition-delay: 150ms;
delay-300transition-delay: 300ms;
-delay-75transition-delay: -75ms;
delay-[.4s]transition-delay: .4s;
View full generated CSS
Compiled CSS
.-delay-75 {
  transition-delay: -75ms;
}
.delay-0 {
  transition-delay: 0ms;
}
.delay-150 {
  transition-delay: 150ms;
}
.delay-300 {
  transition-delay: 300ms;
}
.delay-75 {
  transition-delay: 75ms;
}
.delay-\[\.4s\] {
  transition-delay: .4s;
}