Vizel API / core/src / getVizelPortalContainer
Function: getVizelPortalContainer()
ts
function getVizelPortalContainer(): HTMLElement;Defined in: packages/core/src/controllers/portal.ts:38
Get or create the portal container element.
This function ensures a single portal container exists in the document, creating one if necessary. The container is appended to document.body.
Returns
HTMLElement
The portal container element
Example
typescript
const container = getVizelPortalContainer();
container.appendChild(myFloatingElement);