{"repo":"bridge-kit/svelte-tunnel","free":true,"listed":false,"github":"https://github.com/bridge-kit/svelte-tunnel","clone":"git clone https://github.com/bridge-kit/svelte-tunnel.git","description":"Render markup from deep in your tree into a distant outlet. No prop drilling. No global DOM hacks.","language":"Svelte","stars":16,"topics":["portal","svelte","svelte5","sveltekit","teleport","tunnle"],"license":"MIT","category":"networking-infra","readme_excerpt":"svelte-tunnel Portal content across your Svelte component tree with paired In / Out tunnels. Render markup from deep in the tree into a distant outlet — headers, toasts, modals, drawers, or any shared chrome — without prop drilling or global DOM hacks. Docs & demos: bridge-kit.github.io/svelte-tunnel Why a tunnel? Keep content next to the logic that owns it, while rendering into shared surfaces: - Paired portals — each tunnel() call returns a matched In / Out pair scoped to that instance - Single or multiple — last-wins for menus and tabs, or stack every In for toasts and trays - Svelte 5 native — built with runes, snippets, and mount / unmount; no extra runtime Install Peer dependency: Svelte 5 . Usage Mount In next to the logic that owns the content. Place Out where that content should appear. When In mounts or unmounts, the outlet updates. Modes Mode Behavior ------------------ ------------------------------------------------- single (default) Only the last mounted In is shown at each Out multiple Every mounted In is shown at every Out Use single for exclusive UI (active tab label, one open menu). Use multiple when several sources should appear together (toast stacks, toolbars). Examples Interactive demos live on the examples page. Patterns below mirror those demos. Modal dialog Trigger from nested UI; render the overlay at a host outlet. Toast tray Push notifications from nested actions into shared chrome with mode: 'multiple' . Context through In Context set above In rem","default_branch":null,"files":null,"tree":[],"storefront":"/r/bridge-kit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bridge-kit/svelte-tunnel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}