Components
← All components

Transition

stimeo--transition

Stages enter/leave CSS classes for showing and hiding an element, settling on transitionend or a safety timeout.

The stimeo--transition controller is the shared substrate for show/hide animations — the counterpart to Headless UI Transition / Alpine x-transition. enter() unhides the element, applies the enter and enterFrom classes, then on the next frame swaps enterFrom → enterTo so the CSS transition runs, and on transitionend (or a safety timeout derived from timeout or the computed duration) settles to the entered state. leave() mirrors it and re-applies hidden; toggle() reverses the current direction. The element carries data-transition-state (entering / entered / leaving / left) and emits entered / left on completion. Behavior only — the animation itself is the consumer's CSS, this just controls when the stage classes are applied. Under prefers-reduced-motion it switches instantly (no staging), an interrupting call cancels the in-flight transition, and connect reconciles to a stable state (stripping any half-applied stage classes from a Turbo cache). The transitionend listener, rAF, and safety timer are released on disconnect (Turbo navigation included).

running