Transition Duration
Set the amount of time a transition takes to complete.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Try hovering the div to see how long it takes for the color to change.
300
<div class="w-16 h-16 bg-indigo tp-a tdu-300 h:bg-slate-7"></div>500
<div class="w-16 h-16 bg-indigo tp-a tdu-500 h:bg-slate-7"></div>700
<div class="w-16 h-16 bg-indigo tp-a tdu-700 h:bg-slate-7"></div>Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:tdu-*Small≥640px
md:tdu-*Medium≥768px
lg:tdu-*Large≥1024px
xxl:tdu-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:tdu-*Negative Values
Use negative variants to apply negative transition duration values.
Use the -- syntax to apply negative numeric values.
Syntax:
tdu--*