### Install svelte-portal using npm Source: https://github.com/wobsoriano/svelte-portal/blob/main/README.md This command installs the svelte-portal package using npm. Ensure you have Node.js and npm installed on your system. ```bash npm install @jsrob/svelte-portal ``` -------------------------------- ### Basic svelte-portal Usage Source: https://github.com/wobsoriano/svelte-portal/blob/main/README.md Demonstrates how to use the `` component in Svelte to render a paragraph into the document's body. It requires importing the `Portal` component and specifying the 'body' as the target. ```svelte

This child is placed in the document body.

``` -------------------------------- ### Svelte Portal Rendering Another Component Source: https://github.com/wobsoriano/svelte-portal/blob/main/README.md Illustrates rendering another Svelte component (`Component.svelte`) within a portal. The target is specified using a CSS selector '#element'. This requires the `Component.svelte` file to be present in the same directory. ```svelte ``` -------------------------------- ### Svelte Portal for Conditional Modal Rendering Source: https://github.com/wobsoriano/svelte-portal/blob/main/README.md Shows a Svelte component that uses the `` to render a modal dynamically. The modal is displayed when the 'open' state variable is true and is rendered into the 'body'. Includes basic styling for the modal. ```svelte {#if open} {/if} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.