Backdrop#

Download this notebook from GitHub (right-click to download).


import panel as pn
from panel_material_ui import Backdrop, Button, Column

pn.extension()

The Backdrop component creates modal dialogs for important content or actions.

Parameters:#

Core#

  • open (boolean): Whether the dialog is visible.

  • title (str): Header text for the dialog.


The Backdrop can be programmatically opened and closed by setting the open parameter:

open = Button(label='Open')
close = Button(label='Close')

dialog = Backdrop(close)

open.js_on_click(args={'dialog': dialog}, code="dialog.data.open = true")
close.js_on_click(args={'dialog': dialog}, code="dialog.data.open = false")

Column(open, dialog).preview()

Download this notebook from GitHub (right-click to download).