Skip to main content

Similar to <svelte:window>, the <svelte:body> element allows you to listen for events that fire on document.body. This is useful with the mouseenter and mouseleave events, which don't fire on window.

Add the mouseenter and mouseleave handlers to the <svelte:body> tag:

We stand with Ukraine. Donate → We stand with Ukraine. Petition your leaders. Show your support.