Skip to main content

duration-N

Set tween duration in milliseconds.

Quick reference​

SyntaxBehavior
duration-NInteger 0–10,000 ms; default 150 with tween.
duration-0Immediate tween response.

Example​

<View class="w-12 h-12 bg-accent transition-opacity tween duration-300" />

Rules and validation​

Requires effective tween; invalid on an effective spring. Noninteger/out-of-range values fail. Duration is not a spring response setting. Motion policy can snap even a valid nonzero duration.

Fixed timing · All reference