SidebarLayoutV1

toloka.client.project.template_builder.layouts.SidebarLayoutV1 | Source code

SidebarLayoutV1(
self,
content: Optional[BaseComponent] = None,
controls: Optional[BaseComponent] = None,
*,
controls_width: Optional[Union[BaseComponent, float]] = None,
extra_controls: Optional[BaseComponent] = None,
min_width: Optional[Union[BaseComponent, float]] = None,
validation: Optional[BaseComponent] = None,
version: Optional[str] = '1.0.0'
)

An option for placing (layout) items, which lets you arrange on a page:

  • The main content block.
  • An adjacent panel with controls.

The minWidth property sets the threshold for switching between widescreen and compact modes: when the width of the layout.sidebar component itself becomes less than the value set by the minWidth property, compact mode is enabled.

In widescreen mode, the control panel is located to the right of the main block.

In compact mode, controls stretch to the entire width and are located under each other.

To add an extra panel with controls, use the extraControls property.

Parameters Description

ParametersTypeDescription
contentOptional[BaseComponent]

Content placed in the main area.

controlsOptional[BaseComponent]

Content of the control panel.

controls_widthOptional[Union[BaseComponent, float]]

The width of the control panel in widescreen mode. In compact mode, the panel takes up the entire available width. Default: 200 pixels.

extra_controlsOptional[BaseComponent]

An additional panel with controls. Located below the main panel.

min_widthOptional[Union[BaseComponent, float]]

The minimum width, in pixels, for widescreen mode. If the component width becomes less than the specified value, the interface switches to compact mode. Default: 400 pixels.

validationOptional[BaseComponent]

Validation based on condition.

Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming