Overlays@knitui/components
Portal
Portal (built on react-native-teleport) moves its children to a different place in the view hierarchy so overlays (popovers, dropdowns, modals) escape overflow: hidden and stacking-context ancestors. Pass hostName to teleport into a matching PortalHost — the app-wide host named "root" is mounted by @knitui/core's <Provider>. Omit hostName to render children inline in place (no teleport).
import { Portal } from "@knitui/components";Playground
Loading playground…
<Portal
hostName="root"
/>Examples
Inline
Renders children inline (no hostName) — no teleportation occurs.
Loading example…
Named Host
Teleports into a named PortalHost rendered in the same story.
Loading example…
Controlled Trigger
A controlled trigger story — click the button to mount/unmount the portal. Demonstrates conditional rendering and how the teleported node is cleaned up.
Loading example…
Props
Prop extraction did not resolve this component. Run pnpm docs:generate, or add an override in apps/docs/content/overrides/.