Skip to main content

<Label>

Category: Control tag

The Label tag represents a single label. Use with the Labels tag, including BrushLabels, EllipseLabels, HyperTextLabels, KeyPointLabels, and other Labels tags to specify the value of a specific label.

Attributes​

AttributeTypeRequiredDefaultDescription
valuestringyes—Value of the label
selectedtrue,falsenofalseWhether to preselect this label
maxUsagesnumberno—Maximum number of times this label can be used per task
hintstringno—Hint for label on hover
hotkeystringno—Hotkey to use for the label. Automatically generated if not specified
aliasstringno—Label alias
showAliastrue,falsenofalseWhether to show alias inside label text
aliasStylestringnoopacity:0.6CSS style for the alias
sizestringnomediumSize of text in the label
backgroundstringno#36B37EBackground color of an active label in hexadecimal
selectedColorstringno#ffffffColor of text in an active label in hexadecimal
granularitysymbol,wordno—Set control based on symbol or word selection (only for Text)
htmlstringno—HTML code is used to display label button instead of raw text provided by value (should be properly escaped)
categoryintno—Category is used in the export (in label-studio-converter lib) to make an order of labels for YOLO and COCO

Examples​

Basic named entity recognition labeling configuration for text​

<View>
<Labels name="type" toName="txt-1">
<Label alias="B" value="Brand" />
<Label alias="P" value="Product" />
</Labels>
<Text name="txt-1" value="$text" />
</View>