Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nasso/svelte-teleport

A Svelte component to teleport elements across the DOM
https://github.com/nasso/svelte-teleport

svelte

Last synced: 2 months ago
JSON representation

A Svelte component to teleport elements across the DOM

Awesome Lists containing this project

README

        

# svelte-teleport

A Svelte component to teleport elements across the DOM.

## Example usage

You can also [try it out on the REPL](https://svelte.dev/repl/76df852a8ae748ed95b91ed1cf683a3c?version=3.28.0).

```svelte

import { Portal } from 'svelte-teleport';

let portal_a;
let portal_b;

Example

portal_a.teleport_to(portal_b)}>Teleport!

Portal A

Hello world!

Portal B

```