Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nasso/svelte-teleport
- Owner: nasso
- License: mit
- Created: 2020-09-28T17:27:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-29T20:10:14.000Z (about 4 years ago)
- Last Synced: 2024-09-28T13:42:39.036Z (2 months ago)
- Topics: svelte
- Language: Svelte
- Homepage:
- Size: 3.91 KB
- Stars: 25
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - svelte-teleport - A component to teleport elements across the DOM. (Utilities / Portal)
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
```