Skip to content

layout class

Organizes its children into cells in a regular grid.

Methods

__init__()

__init__(
    columns="1 1",
    gap="0.5rem",
    id=None,
    properties=None,
    class_name=None,
    hover_text=None,
) -> None

Create a new layout element.

Parameters:

Name Type Description Default
columns str

The list of weights for each column.
For example, "1 2" creates a 2 column grid:

  • 1fr
  • 2fr

The creation of multiple same size columns can be simplified by using the multiply sign eg. "5*1" is equivalent to "1 1 1 1 1".

1 1
gap str

The size of the gap between the columns.

0.5rem
id str

The identifier assigned to the rendered HTML component.
This can be used in callbacks or to target the element for styling.

None
properties dict[str, Any]

A dictionary of additional properties that can be set to the element.

None
class_name dynamic(str)

A space-separated list of CSS class names to be applied to the generated HTML element.
These classes are added to the default taipy-layout class.

None
hover_text dynamic(str)

The text that is displayed when the user hovers over the element.

None