toloka.client.project.template_builder.view.DeviceFrameViewV1
| Source code
DeviceFrameViewV1( self, content: Optional[BaseComponent] = None, *, full_height: Optional[Union[BaseComponent, bool]] = None, max_width: Optional[Union[BaseComponent, float]] = None, min_width: Optional[Union[BaseComponent, float]] = None, ratio: Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] = None, hint: Optional[Any] = None, label: Optional[Any] = None, validation: Optional[BaseComponent] = None, version: Optional[str] = '1.0.0')
A view with a frame that is similar to a mobile phone frame.
For more information, see view.device-frame.
Parameters | Type | Description |
---|---|---|
content | Optional[BaseComponent] | The content of the frame. |
full_height | Optional[Union[BaseComponent, bool]] | If |
max_width | Optional[Union[BaseComponent, float]] | The maximum width of the component in pixels. |
min_width | Optional[Union[BaseComponent, float]] | The minimum width of the component in pixels. It takes priority over the |
ratio | Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] | A list with the aspect ratio of the component. Specify the relative width first and then the relative height. This setting is not used if |
hint | Optional[Any] | A hint text. |
label | Optional[Any] | A label above the component. |
validation | Optional[BaseComponent] | Validation rules. |
Last updated: August 28, 2023