canvas module

class Canvas(label, content)

Bases: ModuleBase

The Canvas module is a base class that simplifies adding your own unique view to the framework.

It is intended to be used when you want to combine building blocks into a single view.

Its limitation is that it does not support any interactivity on its own, and no callbacks are defined. It is meant to be used as a container for other components, such as tables, graphs and similar.

It can to a degree replace the need for a completely custom module, but if you need interactivity between the contained modules instead of routing it through the variable selector, you should consider creating a custom module instead.

Parameters:
  • label (str)

  • content (Div)

icon: str | Component
implemented_as: Literal['Tab', 'Window'] | None
label: str
layout()

Creates the layout for the canvas module.

Return type:

Div

module_callbacks()

Define the callbacks belonging to the module itself.

Return type:

None

module_id: str
module_layout: Div | Tab
module_name: str
module_number: int