Path: blob/main/examples/reference/panes/Placeholder.ipynb
3280 views
The Placeholder pane serves as a placeholder for other Panel components. It can be used to display a message while a computation is running, for example.
Parameters:
For details on other options for customizing the component see the layout and styling how-to guides.
object(Any): The Panel object to display, if object is not already a Panel object it will be converted with thepanel(...)function.
The Placeholder pane can accept any Panel component as its argument, including other panes.
The benefit of using a Placeholder is that it allows you to replace the content of the pane without being restricted to a specific type of component. This means you can replace the placeholder with any other pane type, including plots, images, and widgets. You may either use the update method:
or set the object directly:
If you'd like to temporarily replace the contents, you can use it as a context manager.
Upon execution of the cell below, the Placeholder pane will display Starting..., Running..., and Complete! in sequence, with a 1 second pause between each message, before finally displaying Idle again.