Skip to main content
PortalProvider
@coinbase/cds-web@9.0.2
A required root-level provider that creates the DOM containers for CDS overlay components (Modal, Toast, Alert, Tooltip, Tray) and manages overlay state.
import { PortalProvider } from '@coinbase/cds-web/overlays/PortalProvider'
Peer dependencies
  • react-dom: ^18.0.0 || ~19.1.2
Related components

Basic usage

Render PortalProvider once near the root of your application:

Loading...

Custom Portal Nodes

You can disable the default portal rendering and use the PortalNodes component separately:

Loading...

Toast Example

The PortalProvider's toastBottomOffset prop sets the default bottom offset for all toasts:

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.