Skip to content

Portal

The Portal component renders its children in a new DOM tree outside the current component.

import { Portal } from '@fintech-sandpit/ui/react';
const container = useRef<HTMLElement>(document.body);
return (
<Portal container={container}>
<div>
Portal content
</div>
</Portal>
);
NameTypeDefaultDescription
disabledbooleanfalseWhether to disable the portal
containerRefObject<HTMLElement>Document bodyThe container to render the portal in