The htmx:after:settle event fires after htmx finishes the settle phase, including any CSS transitions.
When It Fires
After all settle tasks (CSS transitions, attribute cleanup) have completed for newly swapped content.
Event Detail
task- The swap task that was settlednewContent- Array of settled elementssettleTasks- Array of settle tasks that ran
Example
htmx.on('htmx:after:settle', (evt) => { console.log('Settle complete for', evt.detail.newContent.length, 'element(s)'); // Safe to interact with fully-settled DOM });
The DOM is fully stable at this point — all transitions have run and temporary attributes have been cleaned up.