Toloka documentation

LinkGroupViewV1

toloka.client.project.template_builder.view.LinkGroupViewV1 | Source code

LinkGroupViewV1(
    self,
    links: Optional[Union[BaseComponent, List[Union[BaseComponent, Link]]]] = None,
    *,
    hint: Optional[Any] = None,
    label: Optional[Any] = None,
    validation: Optional[BaseComponent] = None,
    version: Optional[str] = '1.0.0'
)

Puts links into groups

The most important link in a group can be highlighted with a border: set the theme property to primary for this link. This only groups links, unlike GroupViewV1.

Parameters Description

Parameters Type Description
links Optional[Union[BaseComponent, List[Union[BaseComponent, Link]]]]

Array of links that make up a group.

hint Optional[Any]

Hint text.

label Optional[Any]

Label above the component.

validation Optional[BaseComponent]

Validation based on condition.

Examples:

How to add several links.

links = tb.view.LinkGroupViewV1(
    [
        tb.view.LinkGroupViewV1.Link(
            'https://any.com/useful/url/1',
            'Example1',
        ),
        tb.view.LinkGroupViewV1.Link(
            'https://any.com/useful/url/2',
            'Example2',
        ),
    ]
)