Portal

Attach an element to a DOM node outside the parent component's hierarchy.

Portal is rendered at the bottom left of the page
import { Portal } from "ariakit/portal";
import "./style.css";

export default function Example() {
  return (
    <div className="wrapper">
      Portal is rendered at the bottom left of the page
      <Portal>I am portal and I am detached at the bottom of the page.</Portal>
    </div>
  );
}

Installation

npm install ariakit

Learn more in Getting started.

API

<Portal />