Portal API
import { Portal } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
disabled | boolean | |
headless | boolean | |
onMount | (detail: PortalEventDetail) => void | |
onSync | (detail: PortalEventDetail) => void | |
onTargetMissing | (detail: { target: string }) => void | |
onUnmount | (detail: PortalEventDetail) => void | |
strategy | 'append' | 'prepend' | |
target | string |
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