Skip to main content
Version: Next

Portal API

import { Portal } from '@editora/ui-react';

Props​

PropTypeDescription
disabledboolean
headlessboolean
onMount(detail: PortalEventDetail) => void
onSync(detail: PortalEventDetail) => void
onTargetMissing(detail: { target: string }) => void
onUnmount(detail: PortalEventDetail) => void
strategy'append' | 'prepend'
targetstring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-portal>​

Portal renders the ui-portal custom element from @editora/ui-core, which can also be used without React.

Attributes: disabled, headless, strategy, target

Events: mount, sync, target-missing, unmount