panel.theme Package#


theme Package#

The theme module contains Design and Theme components.

Each Design applies a coherent design system (e.g. bootstrap or material) to a template or a set of components, while Theme objects implement different color palettes (e.g. dark or default).

class panel.theme.Bootstrap(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.DarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Theme

Baseclass for dark themes.

Parameters inherited from:

base_css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/dark.css’), label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6cde50>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

bokeh_theme = param.ClassSelector(allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), default=<bokeh.themes.theme.Theme object at 0x111627130>, label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6cd6a0>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

class panel.theme.DefaultTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Theme

Baseclass for default or light themes.

Parameters inherited from:

panel.theme.base.Theme: bokeh_theme, css

base_css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/default.css’), label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6d53a0>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

class panel.theme.Design(theme=None, **params)[source]#

Bases: Parameterized, ResourceComponent

theme = param.ClassSelector(allow_None=True, allow_refs=False, class_=<class ‘panel.theme.base.Theme’>, constant=True, label=’Theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6d5eb0>)

apply(viewable: Viewable, root: Model, isolated: bool = True)[source]#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)[source]#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]][source]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes[source]#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.Fast(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.Inherit[source]#

Bases: object

Singleton object to declare stylesheet inheritance.

class panel.theme.Material(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.Native(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.Theme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Parameterized

Theme objects declare the styles to switch between different color modes. Each Design may declare any number of color themes.

modifiers

The modifiers override parameter values of Panel components.

base_css = param.Filename(allow_None=True, allow_refs=False, check_exists=True, label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6fdeb0>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

bokeh_theme = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6fdbe0>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

css = param.Filename(allow_None=True, allow_refs=False, check_exists=True, label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e6fdf40>, search_paths=[])

A stylesheet that overrides variables specifically for the Theme subclass. In most cases, this is not necessary.


base Module#

Inheritance diagram of panel.theme.base
class panel.theme.base.DarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Theme

Baseclass for dark themes.

Parameters inherited from:

base_css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/dark.css’), label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e984a90>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

bokeh_theme = param.ClassSelector(allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), default=<bokeh.themes.theme.Theme object at 0x111627130>, label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e984dc0>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

class panel.theme.base.DefaultTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Theme

Baseclass for default or light themes.

Parameters inherited from:

panel.theme.base.Theme: bokeh_theme, css

base_css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/default.css’), label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e98a550>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

class panel.theme.base.Design(theme=None, **params)[source]#

Bases: Parameterized, ResourceComponent

theme = param.ClassSelector(allow_None=True, allow_refs=False, class_=<class ‘panel.theme.base.Theme’>, constant=True, label=’Theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e98ac70>)

apply(viewable: Viewable, root: Model, isolated: bool = True)[source]#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)[source]#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]][source]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes[source]#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.base.Inherit[source]#

Bases: object

Singleton object to declare stylesheet inheritance.

class panel.theme.base.Theme(*, base_css, bokeh_theme, css, name)[source]#

Bases: Parameterized

Theme objects declare the styles to switch between different color modes. Each Design may declare any number of color themes.

modifiers

The modifiers override parameter values of Panel components.

base_css = param.Filename(allow_None=True, allow_refs=False, check_exists=True, label=’Base css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e93c250>, search_paths=[])

A stylesheet declaring the base variables that define the color scheme. By default this is inherited from a base class.

bokeh_theme = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e83f520>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

css = param.Filename(allow_None=True, allow_refs=False, check_exists=True, label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17e917a00>, search_paths=[])

A stylesheet that overrides variables specifically for the Theme subclass. In most cases, this is not necessary.


bootstrap Module#

Inheritance diagram of panel.theme.bootstrap
class panel.theme.bootstrap.Bootstrap(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.bootstrap.BootstrapDarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: DarkTheme

The BootstrapDarkTheme is a Dark Theme in the style of Bootstrap

Parameters inherited from:

panel.theme.base.DarkTheme: base_css, bokeh_theme

css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/bootstrap_dark.css’), label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea36880>, search_paths=[])

A stylesheet that overrides variables specifically for the Theme subclass. In most cases, this is not necessary.

class panel.theme.bootstrap.BootstrapDefaultTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: DefaultTheme

The BootstrapDefaultTheme is a light theme.

Parameters inherited from:

css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/bootstrap_default.css’), label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea46100>, search_paths=[])

A stylesheet that overrides variables specifically for the Theme subclass. In most cases, this is not necessary.


fast Module#

Inheritance diagram of panel.theme.fast
class panel.theme.fast.Fast(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.fast.FastDarkTheme(*, style, base_css, bokeh_theme, css, name)[source]#

Bases: DarkTheme

Parameters inherited from:

style = param.ClassSelector(allow_refs=False, class_=<class ‘panel.theme.fast.FastStyle’>, default=FastStyle(accent_base_color=’#0072B5’, background_color=’#181818’, collapsed_icon=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”collapsed-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M9 5.44446V12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, color=’#ffffff’, corner_radius=3, expanded_icon=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”expanded-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, font=’Open Sans, sans-serif’, font_url=’//fonts.googleapis.com/css?family=Open+Sans’, header_accent_base_color=’#ffffff’, header_background=’#0072B5’, header_color=’#ffffff’, header_neutral_color=’#ffffff’, luminance=0.1, name=’FastStyle00102’, neutral_color=’#000000’, neutral_fill_card_rest=’#212121’, neutral_focus=’#717171’, neutral_foreground_rest=’#e5e5e5’, shadow=False), label=’Style’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea48ca0>)

property bokeh_theme#

Provide new default values for Bokeh models.

Bokeh Model properties all have some built-in default value. If a property has not been explicitly set (e.g. m.foo = 10), accessing the property will return the default value. It may be useful for users to be able to specify a different set of default values than the built-in default. The Theme class allows collections of custom default values to be easily applied to Bokeh documents.

The Theme class can be constructed either from a YAML file or from a JSON dict (but not both). Examples of both formats are shown below.

The plotting API’s defaults override some theme properties. Namely: fill_alpha, fill_color, line_alpha, line_color, text_alpha and text_color. Those properties should therefore be set explicitly when using the plotting API.

Parameters:
  • filename (str, optional) – path to a YAML theme file

  • json (str, optional) – a JSON dictionary specifying theme values

Raises:

ValueError – If neither filename or json is supplied.

Examples

Themes are specified by providing a top-level key attrs which has blocks for Model types to be themed. Each block has keys and values that specify the new property defaults for that type.

Take note of the fact that YAML interprets the value None as a string, which is not usually what you want. To give None as a value in YAML, use !!null. To give ‘None’ as a value in json, use null.

Here is an example theme in YAML format that sets various visual properties for all figures, grids, and titles:

attrs:
    Plot:
        background_fill_color: '#2F2F2F'
        border_fill_color: '#2F2F2F'
        outline_line_color: '#444444'
    Axis:
        axis_line_color: !!null
    Grid:
        grid_line_dash: [6, 4]
        grid_line_alpha: .3
    Title:
        text_color: "white"

Here is the same theme, in JSON format:

{
    'attrs' : {
        'Plot': {
            'background_fill_color': '#2F2F2F',
            'border_fill_color': '#2F2F2F',
            'outline_line_color': '#444444',
        },
        'Axis': {
            'axis_line_color': None,
        },
        'Grid': {
            'grid_line_dash': [6, 4],
            'grid_line_alpha': .3,
        },
        'Title': {
            'text_color': 'white'
        }
    }
}
class panel.theme.fast.FastDefaultTheme(*, style, base_css, bokeh_theme, css, name)[source]#

Bases: DefaultTheme

Parameters inherited from:

style = param.ClassSelector(allow_refs=False, class_=<class ‘panel.theme.fast.FastStyle’>, default=FastStyle(accent_base_color=’#0072B5’, background_color=’#ffffff’, collapsed_icon=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”collapsed-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M9 5.44446V12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, color=’#2B2B2B’, corner_radius=3, expanded_icon=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”expanded-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, font=’Open Sans, sans-serif’, font_url=’//fonts.googleapis.com/css?family=Open+Sans’, header_accent_base_color=’#ffffff’, header_background=’#0072B5’, header_color=’#ffffff’, header_neutral_color=’#ffffff’, luminance=1.0, name=’FastStyle00101’, neutral_color=’#000000’, neutral_fill_card_rest=’#F7F7F7’, neutral_focus=’#888888’, neutral_foreground_rest=’#2B2B2B’, shadow=True), label=’Style’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02580>)

class panel.theme.fast.FastStyle(*, accent_base_color, background_color, collapsed_icon, color, corner_radius, expanded_icon, font, font_url, header_accent_base_color, header_background, header_color, header_neutral_color, luminance, neutral_color, neutral_fill_card_rest, neutral_focus, neutral_foreground_rest, shadow, name)[source]#

Bases: Parameterized

The FastStyle class provides the different colors and icons used to style the Fast Templates.

background_color = param.String(allow_refs=False, default=’#ffffff’, label=’Background color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea676d0>)

neutral_color = param.String(allow_refs=False, default=’#000000’, label=’Neutral color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

accent_base_color = param.String(allow_refs=False, default=’#0072B5’, label=’Accent base color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea8cd30>)

collapsed_icon = param.String(allow_refs=False, default=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”collapsed-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M9 5.44446V12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, label=’Collapsed icon’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

expanded_icon = param.String(allow_refs=False, default=’n<svg style=”stroke: var(–accent-fill-rest);” width=”18” height=”18” viewBox=”0 0 18 18” fill=”none” xmlns=”http://www.w3.org/2000/svg” slot=”expanded-icon”>n <path d=”M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z” stroke-linecap=”round” stroke-linejoin=”round”></path>n <path d=”M5.44446 9H12.5556” stroke-linecap=”round” stroke-linejoin=”round”></path>n</svg>n’, label=’Expanded icon’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea67280>)

color = param.String(allow_refs=False, default=’#2B2B2B’, label=’Color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

neutral_fill_card_rest = param.String(allow_refs=False, default=’#F7F7F7’, label=’Neutral fill card rest’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea672e0>)

neutral_focus = param.String(allow_refs=False, default=’#888888’, label=’Neutral focus’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

neutral_foreground_rest = param.String(allow_refs=False, default=’#2B2B2B’, label=’Neutral foreground rest’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea677c0>)

header_background = param.String(allow_refs=False, default=’#0072B5’, label=’Header background’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

header_neutral_color = param.String(allow_refs=False, default=’#ffffff’, label=’Header neutral color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea677f0>)

header_accent_base_color = param.String(allow_refs=False, default=’#ffffff’, label=’Header accent base color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

header_color = param.String(allow_refs=False, default=’#ffffff’, label=’Header color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea678b0>)

font = param.String(allow_refs=False, default=’Open Sans, sans-serif’, label=’Font’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

font_url = param.String(allow_refs=False, default=’//fonts.googleapis.com/css?family=Open+Sans’, label=’Font url’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ea676a0>)

corner_radius = param.Integer(allow_refs=False, default=3, inclusive_bounds=(True, True), label=’Corner radius’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

shadow = param.Boolean(allow_refs=False, default=True, label=’Shadow’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eae8850>)

luminance = param.Magnitude(allow_refs=False, bounds=(0.0, 1.0), default=1.0, inclusive_bounds=(True, True), label=’Luminance’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb02cd0>)

create_bokeh_theme()[source]#

Returns a custom bokeh theme based on the style parameters

Returns:

A Bokeh Theme

Return type:

Dict

class panel.theme.fast.FastThemeMixin(*, css, name)[source]#

Bases: Parameterized

css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/fast_variables.css’), label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb09b80>, search_paths=[])

class panel.theme.fast.FastWrapper(*, object, style, loading, align, aspect_ratio, background, css_classes, design, height, height_policy, margin, max_height, max_width, min_height, min_width, sizing_mode, styles, stylesheets, tags, visible, width, width_policy, name)[source]#

Bases: ReactiveHTML

Wraps any Panel component and initializes the Fast design provider.

Wrapping a component in this way ensures that so that any children using the Fast design system have access to the Fast CSS variables.

Parameters inherited from:

panel.viewable.Layoutable: align, aspect_ratio, background, css_classes, design, height, min_width, min_height, max_width, max_height, margin, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visible

panel.viewable.Viewable: loading

object = param.ClassSelector(allow_None=True, allow_refs=False, class_=<class ‘panel.viewable.Viewable’>, label=’Object’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb094f0>)

style = param.ClassSelector(allow_None=True, allow_refs=False, class_=<class ‘panel.theme.fast.FastStyle’>, label=’Style’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17eb15040>)

app(notebook_url: str = 'localhost:8888', port: int = 0) Server#

Displays a bokeh server app inline in the notebook.

Parameters:
  • notebook_url (str) – URL to the notebook server

  • port (int (optional, default=0)) – Allows specifying a specific port

clone(**params) Viewable#

Makes a copy of the object sharing the same parameters.

Parameters:

params (Keyword arguments override the parameters on the clone.) –

Return type:

Cloned Viewable object

controls(parameters: List[str] = [], jslink: bool = True, **kwargs) Panel#

Creates a set of widgets which allow manipulating the parameters on this instance. By default all parameters which support linking are exposed, but an explicit list of parameters can be provided.

Parameters:
  • parameters (list(str)) – An explicit list of parameters to return controls for.

  • jslink (bool) – Whether to use jslinks instead of Python based links. This does not allow using all types of parameters.

  • kwargs (dict) – Additional kwargs to pass to the Param pane(s) used to generate the controls widgets.

Return type:

A layout of the controls

embed(max_states: int = 1000, max_opts: int = 3, json: bool = False, json_prefix: str = '', save_path: str = './', load_path: Optional[str] = None, progress: bool = False, states={}) None#

Renders a static version of a panel in a notebook by evaluating the set of states defined by the widgets in the model. Note this will only work well for simple apps with a relatively small state space.

Parameters:
  • max_states (int) – The maximum number of states to embed

  • max_opts (int) – The maximum number of states for a single widget

  • json (boolean (default=True)) – Whether to export the data to json files

  • json_prefix (str (default='')) – Prefix for JSON filename

  • save_path (str (default='./')) – The path to save json files to

  • load_path (str (default=None)) – The path or URL the json files will be loaded from.

  • progress (boolean (default=False)) – Whether to report progress

  • states (dict (default={})) – A dictionary specifying the widget values to embed for each widget

get_root(doc: Optional[Document] = None, comm: Optional[Comm] = None, preprocess: bool = True) Model#

Returns the root model and applies pre-processing hooks

Parameters:
  • doc (bokeh.Document) – Bokeh document the bokeh model will be attached to.

  • comm (pyviz_comms.Comm) – Optional pyviz_comms when working in notebook

  • preprocess (boolean (default=True)) – Whether to run preprocessing hooks

Return type:

Returns the bokeh model corresponding to this panel object

jscallback(args: Dict[str, Any] = {}, **callbacks: str) Callback#

Allows defining a JS callback to be triggered when a property changes on the source object. The keyword arguments define the properties that trigger a callback and the JS code that gets executed.

Parameters:
  • args (dict) – A mapping of objects to make available to the JS callback

  • **callbacks (dict) – A mapping between properties on the source model and the code to execute when that property changes

Returns:

callback – The Callback which can be used to disable the callback.

Return type:

Callback

Links properties on the this Reactive object to those on the target Reactive object in JS code.

Supports two modes, either specify a mapping between the source and target model properties as keywords or provide a dictionary of JS code snippets which maps from the source parameter to a JS code snippet which is executed when the property changes.

Parameters:
  • target (panel.viewable.Viewable | bokeh.model.Model | holoviews.core.dimension.Dimensioned) – The target to link the value to.

  • code (dict) – Custom code which will be executed when the widget value changes.

  • args (dict) – A mapping of objects to make available to the JS callback

  • bidirectional (boolean) – Whether to link source and target bi-directionally

  • **links (dict) – A mapping between properties on the source model and the target model property to link it to.

Returns:

link – The GenericLink which can be used unlink the widget and the target model.

Return type:

GenericLink

Links the parameters on this Reactive object to attributes on the target Parameterized object.

Supports two modes, either specify a mapping between the source and target object parameters as keywords or provide a dictionary of callbacks which maps from the source parameter to a callback which is triggered when the parameter changes.

Parameters:
  • target (param.Parameterized) – The target object of the link.

  • callbacks (dict | None) – Maps from a parameter in the source object to a callback.

  • bidirectional (bool) – Whether to link source and target bi-directionally

  • **links (dict) – Maps between parameters on this object to the parameters on the supplied object.

on_event(node: str, event: str, callback: Callable) None#

Registers a callback to be executed when the specified DOM event is triggered on the named node. Note that the named node must be declared in the HTML. To create a named node you must give it an id of the form id=”name”, where name will be the node identifier.

Parameters:
  • node (str) – Named node in the HTML identifiable via id of the form id=”name”.

  • event (str) – Name of the DOM event to add an event listener to.

  • callback (callable) – A callable which will be given the DOMEvent object.

pprint() None#

Prints a compositional repr of the class.

save(filename: str | os.PathLike | IO, title: Optional[str] = None, resources: Resources | None = None, template: str | Template | None = None, template_variables: Dict[str, Any] = {}, embed: bool = False, max_states: int = 1000, max_opts: int = 3, embed_json: bool = False, json_prefix: str = '', save_path: str = './', load_path: Optional[str] = None, progress: bool = True, embed_states: Dict[Any, Any] = {}, as_png: bool | None = None, **kwargs) None#

Saves Panel objects to file.

Parameters:
  • filename (str or file-like object) – Filename to save the plot to

  • title (string) – Optional title for the plot

  • resources (bokeh resources) – One of the valid bokeh.resources (e.g. CDN or INLINE)

  • template – passed to underlying io.save

  • template_variables – passed to underlying io.save

  • embed (bool) – Whether the state space should be embedded in the saved file.

  • max_states (int) – The maximum number of states to embed

  • max_opts (int) – The maximum number of states for a single widget

  • embed_json (boolean (default=True)) – Whether to export the data to json files

  • json_prefix (str (default='')) – Prefix for the auto-generated json directory

  • save_path (str (default='./')) – The path to save json files to

  • load_path (str (default=None)) – The path or URL the json files will be loaded from.

  • progress (boolean (default=True)) – Whether to report progress

  • embed_states (dict (default={})) – A dictionary specifying the widget values to embed for each widget

  • as_png (boolean (default=None)) – To save as a .png. If None save_png will be true if filename is string and ends with png.

select(selector: Optional[type | Callable[['Viewable'], bool]] = None) List['Viewable']#

Iterates over the Viewable and any potential children in the applying the Selector.

Parameters:

selector (type or callable or None) – The selector allows selecting a subset of Viewables by declaring a type or callable function to filter by.

Returns:

viewables

Return type:

list(Viewable)

servable(title: Optional[str] = None, location: bool | 'Location' = True, area: str = 'main', target: Optional[str] = None) ServableMixin#

Serves the object or adds it to the configured pn.state.template if in a panel serve context, writes to the DOM if in a pyodide context and returns the Panel object to allow it to display itself in a notebook context.

Parameters:
  • title (str) – A string title to give the Document (if served as an app)

  • location (boolean or panel.io.location.Location) – Whether to create a Location component to observe and set the URL location.

  • area (str (deprecated)) – The area of a template to add the component too. Only has an effect if pn.config.template has been set.

  • target (str) – Target area to write to. If a template has been configured on pn.config.template this refers to the target area in the template while in pyodide this refers to the ID of the DOM node to write to.

Return type:

The Panel object itself

server_doc(doc: Optional[Document] = None, title: Optional[str] = None, location: bool | 'Location' = True) Document#

Returns a serveable bokeh Document with the panel attached

Parameters:
  • doc (bokeh.Document (optional)) – The bokeh Document to attach the panel to as a root, defaults to bokeh.io.curdoc()

  • title (str) – A string title to give the Document

  • location (boolean or panel.io.location.Location) – Whether to create a Location component to observe and set the URL location.

Returns:

doc – The bokeh document the panel was attached to

Return type:

bokeh.Document

show(title: Optional[str] = None, port: int = 0, address: Optional[str] = None, websocket_origin: Optional[str] = None, threaded: bool = False, verbose: bool = True, open: bool = True, location: bool | 'Location' = True, **kwargs) StoppableThread' | 'Server#

Starts a Bokeh server and displays the Viewable in a new tab.

Parameters:
  • title (str | None) – A string title to give the Document (if served as an app)

  • port (int (optional, default=0)) – Allows specifying a specific port

  • address (str) – The address the server should listen on for HTTP requests.

  • websocket_origin (str or list(str) (optional)) – A list of hosts that can connect to the websocket. This is typically required when embedding a server app in an external web site. If None, “localhost” is used.

  • threaded (boolean (optional, default=False)) – Whether to launch the Server on a separate thread, allowing interactive use.

  • verbose (boolean (optional, default=True)) – Whether to print the address and port

  • open (boolean (optional, default=True)) – Whether to open the server in a new browser tab

  • location (boolean or panel.io.location.Location) – Whether to create a Location component to observe and set the URL location.

Returns:

server – Returns the Bokeh server instance or the thread the server was launched on (if threaded=True)

Return type:

bokeh.server.Server or panel.io.server.StoppableThread


material Module#

Inheritance diagram of panel.theme.material
class panel.theme.material.Material(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.material.MaterialDarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: MaterialThemeMixin, DarkTheme

The MaterialDarkTheme is a Dark Theme in the style of Material Design

Parameters inherited from:

bokeh_theme = param.ClassSelector(allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), default=<bokeh.themes.theme.Theme object at 0x11163e190>, label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ee46760>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

class panel.theme.material.MaterialDefaultTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: MaterialThemeMixin, DefaultTheme

The MaterialDefaultTheme is a light theme.

Parameters inherited from:

bokeh_theme = param.ClassSelector(allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), default=<bokeh.themes.theme.Theme object at 0x111609550>, label=’Bokeh theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ee46ca0>)

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

class panel.theme.material.MaterialThemeMixin(*, css, name)[source]#

Bases: Parameterized

css = param.Filename(allow_refs=False, check_exists=True, default=PosixPath(‘/Users/runner/work/panel/panel/panel/theme/css/material_variables.css’), label=’Css’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17ee51a90>, search_paths=[])


native Module#

Inheritance diagram of panel.theme.native
class panel.theme.native.Native(theme=None, **params)[source]#

Bases: Design

Parameters inherited from:

apply(viewable: Viewable, root: Model, isolated: bool = True)#

Applies the Design to a Viewable and all it children.

Parameters:
  • viewable (Viewable) – The Viewable to apply the Design to.

  • root (Model) – The root Bokeh model to apply the Design to.

  • isolated (bool) – Whether the Design is applied to an individual component or embedded in a template that ensures the resources, such as CSS variable definitions and JS are already initialized.

apply_bokeh_theme_to_model(model: Model, theme_override=None)#

Applies the Bokeh theme associated with this Design system to a model.

Parameters:
  • model (bokeh.model.Model) – The Model to apply the theme on.

  • theme_override (str | None) – A different theme to apply.

params(viewable: Viewable, doc: Document | None = None) Tuple[Dict[str, Any], Dict[str, Any]]#

Provides parameter values to apply the provided Viewable.

Parameters:
  • viewable (Viewable) – The Viewable to return modifiers for.

  • doc (Document | None) – Document the Viewable will be rendered into. Useful for caching any stylesheets that are created.

Returns:

  • modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the Viewable.

  • child_modifiers (Dict[str, Any]) – Dictionary of parameter values to apply to the children of the Viewable.

resolve_resources(cdn: bool | Literal['auto'] = 'auto', include_theme: bool = True) ResourceTypes#

Resolves the resources required for this design component.

Parameters:
  • cdn (bool | Literal['auto']) – Whether to load resources from CDN or local server. If set to ‘auto’ value will be automatically determine based on global settings.

  • include_theme (bool) – Whether to include theme resources.

Return type:

Dictionary containing JS and CSS resources.

class panel.theme.native.NativeDarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: DarkTheme

Parameters inherited from: