Skip to main content

Label

A text label with a colored background

Labels are scaled in screen-space. This means that they will stay the same size independent to the zoom level of the scene.

Labels do not support rich text or user editing.

Extends Item

TYPE
object

Properties

NAMETYPEDESCRIPTION
type"LABEL"The type of item
textTextContentThe text displayed in the label
styleLabelStyleThe style of the label

Type Definitions

LabelStyle

TYPE
object

Properties

NAMETYPEDESCRIPTION
backgroundColorstringThe background color of the label
backgroundOpacitynumberThe background opacity of the label
cornerRadiusstringThe radius of the labels corner in pixels
pointerWidthnumberAn optional width for the label arrow in pixels
pointerHeightnumberAn optional height for the label arrow in pixels
pointerDirection"UP" | "DOWN" | "LEFT" | "RIGHT"An optional direction for the label arrow