htmx 4.0 is under construction — migration guide

htmx:after:viewTransition

After View Transition completes

The htmx:after:viewTransition event fires after a View Transition animation completes.

When It Fires

After the View Transition API finishes animating the swap operation.

Event Detail

  • task - Transition callback information

Example

htmx.on('htmx:after:viewTransition', (evt) => { console.log('View transition complete'); // Perform actions after transition animation });

The swap and transition are both complete at this point.