Skip to main content

Interface: LinkLabelProps

Props for LinkLabel component.

See

LinkLabel

Properties

PropertyTypeDescription

children?

ReactNode

Additional content rendered with the label.

This content is rendered in the SVG context.

className?

string

Additional CSS class for the component.

content?

ReactNode

Label text content.

This content is nested in SVG <text> element, so only plain text children or elements like <tspan> should be specified.

line?

number

Vertical row shift for the label (e.g. -1 for one row above, 1 for one row below).

Default

0

link

Link

Owner link to display label over.

position

Vector

Label position in paper coordinates.

primary?

boolean

Whether the label should be considered as primary one for the link.

Primary label bounds are available via RenderingState.getLinkLabelBounds.

rectClass?

string

Additional CSS class for the SVG rect used as underlying text background.

rectStyle?

CSSProperties

Additional CSS styles for the SVG rect used as underlying text background.

textAnchor?

"end" | "start" | "middle"

Label text alignment relative to its position.

Default

"middle"

textClass?

string

Additional CSS class for the SVG text used to display the label text.

textStyle?

CSSProperties

Additional CSS styles for the SVG text used to display the label text.

title?

string

Title for the label.