An overlay component.

Parameters:
NameTypeDescription
propsobject

The props for the component template.

Properties
NameTypeDescription
animationDelaynumber

Delay before the animation starts.

childrenJSX.Element

React element children.

customAttributesobject

Any custom attributes.

customClassesstring | Array | object

An array of additional classes.

hasConfirmboolean

Whether the overlay has a confirm button.

i18nobject

i18n strings.

ignoreOutsideClickClassesArray

Array of selectors to ignore outside click.

isOpenboolean

Whether the overlay is open.

onCancelfunction

Callback function when the overlay is canceled.

onClosefunction

Callback function when the overlay is closed.

onCloseAfterAnimationfunction

Callback function when the overlay is closed after animation.

onConfirmfunction

Callback function when the overlay is confirmed.

onOpenfunction

Callback function when the overlay is opened.

onOpenAfterAnimationfunction

Callback function when the overlay is opened after animation.

placementstring

Placement of the overlay.

positionstring

Position of the overlay.

verticalOffsetnumber

Vertical offset of the overlay.

widthstring

Width of the overlay.

zIndexnumber

Z-index of the overlay.

refobject | null

Ref to the component.

Since
  • 5.6.0
Returns:

The overlay component.

Type: 
JSX.Element
Example
import Overlay from '@gravityforms/components/react/admin/modules/Overlay';

return (
    <Overlay>
        <div>Overlay Content</div>
    </Overlay>
);