Page#
Download this notebook from GitHub (right-click to download).
import panel as pn
from panel_material_ui import Page, Tabs
pn.extension()
The Page component is the equivalent of a Template in Panel, defining the overall layout of an application.
Unlike a Template, the Page component is implemented entirely in JavaScript, allowing dynamic updates of its contents without re-rendering the entire layout.
Parameters:#
For details on other options for customizing the component see the layout and styling how-to guides.
Core#
config(Config): Configuration object declaring custom CSS and JS files to load specifically for this template.favicon(Path | str | dict[str, str | Path]): Favicon to render.logo(Path | str | dict[str, str | Path]): Logo to render in the header. Can be a string, a pathlib.Path, or a dictionary with breakpoints as keys, e.g. {‘sm’: ‘logo_mobile.png’, ‘md’: ‘logo.png’} or themes as keys, e.g.{'dark': 'logo_dark.png', 'light': 'logo.png'}.meta(Meta): Meta tags and other HTML head elements.template(str | Path | jinja2.Template): Overrides the default jinja2 template.title(str): Title of the application.
Layout#
header(Children): Items rendered in the header.main(Children): Items rendered in the main area.sidebar(Children): Items rendered in the sidebar.contextbar(Children): Items rendered in the contextbar.
Contextbar#
contextbar_open(boolean): Whether the contextbar is open or closed.contextbar_width(int): Width of the contextbar.
Indicators#
busy(boolean, readonly): Linked to global busy state.busy_indicator(Literal["circular", "linear"] | None): Whether to render a linear, circular or no busy indicator.theme_toggle(boolean): Whether to show a theme toggle button.