In React you can render a component in a different node using Portals:
ReactDOM.createPortal(
<Component />,
document.getElementById('id')
);
Same for Vue using the portal-vue package.
But is there a way to something similar in Svelte?
<body>
<Header>
<Modal /> <!-- Modal is rendered here -->
</Header>
<!-- But the Modal DOM would be injected at the body end -->
</body>