sepal_ui.sepalwidgets.tile.Tile#

class sepal_ui.sepalwidgets.tile.Tile(**kwargs)[source]#

Custom Layout widget for the sepal UI framework.

It is an helper to build a consistent tiling system. Tile objects are indeed compatible with the other classes from sepal_ui.

Parameters:
  • id – the tile id that will be written in its mount_id _metadata attribute

  • title (str) – the title of the Tile

  • inputs (list) – the list of widget to display inside the tile

  • btn (Btn | None) – the process btn

  • alert (Alert | None) – the alert to display process information to the end user

  • kwargs – any parameter from a v.Layout. if set, ‘children’ and ‘_metadata’ will be overwritten.

  • id_ (str)

Attributes

alert

the alert to display process information to the end user

btn

the process btn

title

the title of the Tile

Methods

__init__

Custom Layout widget for the sepal UI framework.

get_id

Get the mount_id value.

get_title

Return the current title of the tile.

nest

Prepare the tile to be used as a nested component in a tile.

set_content

Replace the current content of the tile with the provided inputs.

set_title

Replace the current title and activate it.

toggle_inputs

Display only the widgets that are part of the input_list.

Tile.__init__(id_, title, inputs=[''], btn=None, alert=None, **kwargs)[source]#

Custom Layout widget for the sepal UI framework.

It is an helper to build a consistent tiling system. Tile objects are indeed compatible with the other classes from sepal_ui.

Parameters:
  • id – the tile id that will be written in its mount_id _metadata attribute

  • title (str) – the title of the Tile

  • inputs (list) – the list of widget to display inside the tile

  • btn (Btn | None) – the process btn

  • alert (Alert | None) – the alert to display process information to the end user

  • kwargs – any parameter from a v.Layout. if set, ‘children’ and ‘_metadata’ will be overwritten.

  • id_ (str)

Return type:

None

Tile.get_id()[source]#

Get the mount_id value.

Returns:

the moun_id value from _metadata dict

Return type:

str

Tile.get_title()[source]#

Return the current title of the tile.

Returns:

the title

Return type:

str

Tile.nest()[source]#

Prepare the tile to be used as a nested component in a tile.

the elevation will be set to 0 and the title remove from children. The mount_id will also be changed to nested.

Return type:

Self

Tile.set_content(inputs)[source]#

Replace the current content of the tile with the provided inputs.

It will keep the output and btn widget if existing.

Parameters:
  • tile (the list of widget to display inside the)

  • inputs (list)

Return type:

Self

Tile.set_title(title='')[source]#

Replace the current title and activate it.

If no title is provided, the title is removed from the tile content.

Parameters:

title (str) – the new title of the object

Return type:

Self

Tile.toggle_inputs(fields_2_show, fields)[source]#

Display only the widgets that are part of the input_list.

The widget_list is the list of all the widgets of the tile.

Parameters:
  • fields_2_show (List[VuetifyWidget]) – the list of input to be display

  • fields (List[VuetifyWidget]) – the list of the tile widget

Return type:

Self