toloka.client.project.template_builder.view.TextViewV1
| Source code
TextViewV1( self, content: Optional[Any] = None, *, hint: Optional[Any] = None, label: Optional[Any] = None, validation: Optional[BaseComponent] = None, version: Optional[str] = '1.0.0')
Block for displaying text.
If you need formatted text, use view.markdown.
Parameters | Type | Description |
---|---|---|
content | Optional[Any] | The text displayed in the block. To insert a new line, use |
hint | Optional[Any] | Hint text. |
label | Optional[Any] | Label above the component. |
validation | Optional[BaseComponent] | Validation based on condition. |
Examples:
How to show labeled field from the task inputs.
text_view = tb.view.TextViewV1(tb.data.InputData('input_field_name'), label='My label:')