No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Portal

A portal render content outside of a DOM tree, at the end of the document.

This allows content to escape traditional boundaries caused by "overflow: hidden" CSS rules and keeps it on the top without using z-index rules. This is useful for example in Menu and Tooltip scenarios, where the content should always overlay everything else.


Default

Portal nested within
Portal nested within
Open in CodeSandbox
NameDescriptionDefault
children
React children
ReactNode
-
mountNode
Where the portal children are mounted on DOM
HTMLDivElement
-

Stories

Nested

Portal nested within
Portal nested within
Open in CodeSandbox
Portal content
Portal content
Outer portal
Inner portal