Swirski UI

Hook

usePortalRoot

Returns the document body once the app has mounted so portal components can render safely.

Import

import { usePortalRoot } from "@swirski/ui";

Usage

const portalRoot = usePortalRoot();

Returns

1 documented
ValueTypeNotes
portalRootHTMLElementRoot element to use for portals.
Previous: useClipboardNext: useDisclosure