interface PortalOptions {
    modifyContainer?: (container: HTMLElement) => void;
    placeholder?: unknown;
}

Properties

modifyContainer?: (container: HTMLElement) => void

When provided, the modifyContainer function will be called with the portal's container given as the argument. This allows you to programmatically control the container before the portal renders.

placeholder?: unknown

When provided, placeholder will be immediately rendered in the portal. Assuming that content is a promise, it will replace the placeholder once it resolves.