OverlayPanel is accessed via its reference where visibility is controlled using toggle, show and hide methods.
+Clicking outside the overlay hides the panel, setting dismissable to false disables this behavior. + Additionally enablign showCloseIcon property displays a close icon at the top right corner to close the panel.
+Name | +Type | +Default | +Description | +
---|---|---|---|
dismissable | +boolean | +true | +Enables to hide the overlay when outside is clicked. | +
showCloseIcon | +boolean | +false | +When enabled, displays a close icon at top right corner. | +
appendTo | +string | +null | +DOM element instance where the dialog should be mounted. | +
baseZIndex | +number | +0 | +Base zIndex value to use in layering. | +
autoZIndex | +boolean | +true | +Whether to automatically manage layering. | +
Name | +Parameters | +Description | +
---|---|---|
toggle | +event: Browser event | +Toggles the visiblity of the overlay. | +
show | +event: Browser event + target: Optional target if event.target should not be used |
+ Shows the overlay. | +
hide | +- | +Hides the overlay. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-overlaypanel | +Container element. | +
p-overlaypanel-content | +Content of the panel. | +
p-overlaypanel-close | +Close icon. | +
None.
+