Dialog is used as a container and visibility is managed with visible property, use the sync operator for two-way binding.
+Header and Footer sections are defined using properties with the same name that accept simple strings or slots for custom content.
+Dynamic content may move the dialog boundaries outside of the viewport. Common solution is defining max-height via contentStyle so longer content displays a scrollbar.
+ +Name | +Type | +Default | +Description | +
---|---|---|---|
header | +any | +null | +Title content of the dialog. | +
footer | +any | +null | +Footer content of the dialog. | +
visible | +boolean | +false | +Specifies the visibility of the dialog. | +
modal | +boolean | +null | +Defines if background should be blocked when dialog is displayed. | +
contentStyle | +object | +null | +Style of the content section. | +
rtl | +boolean | +null | +When enabled dialog is displayed in RTL direction. | +
closable | +boolean | +true | +Adds a close icon to the header to hide the dialog. | +
showHeader | +boolean | +true | +Whether to show the header or not. | +
baseZIndex | +number | +0 | +Base zIndex value to use in layering. | +
autoZIndex | +boolean | +true | +Whether to automatically manage layering. | +
Name | +Parameters | +Description | +
---|---|---|
hide | +event: Event object | +Callback to invoke when dialog is hidden. | +
show | +event: Event object | +Callback to invoke when dialog is showed. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-dialog | +Container element. | +
p-dialog-titlebar | +Container of header. | +
p-dialog-title | +Header element. | +
p-dialog-titlebar-icon | +Icon container inside header. | +
p-dialog-titlebar-close | +Close icon element. | +
p-dialog-content | +Content element | +
None.
+