Portal

Portal is a component that renders elements outside of the current DOM hierarchy.

元の世界

ナツキ・スバル

Usage

import { Portal } from "@yamada-ui/react"
<Portal />

Change the destination

To change the destination, set the ref of the destination to containerRef. By default, it transfers to the end of document.body.

元の世界

ナツキ・スバル

エミリアたん

Disable portaling

To disable forwarding, set disabled to true.

元の世界

ナツキ・スバル

Props

Similar Components

For

For is a component used to loop over an array and render a component for each item.

Format

Format is used to format dates, numbers, and bytes according to a specific locale.

Slot

Slot is a component that merges its props onto its immediate child.

ClientOnly

ClientOnly is a component that renders its children only on the client side.

Show

Show is a component that shows or hides its children based on a condition.

Used By Components & Hooks