Skip to main content

ShapeComponentProps

Props for a ShapeComponent

Type Parameters

T

T extends Vertex

Properties

ctx

ctx: JsxWrapperProps<T>

Context for the vertex, as passed in by the SurfaceComponent.


font?

optional font: FontSpec

Optional font size/style to use for this shape.


labelColor?

optional labelColor: string

Color for the label. Defaults to #000000.


labelFillRatio?

optional labelFillRatio: number

For multiline labels, the proportion of the width of the shape that the longest line can take up.


labelPosition?

optional labelPosition: LabelPosition

Defaults to "center". Use "top" or "bottom" to set the label above or below the shape.


labelProperty?

optional labelProperty: string

The name of the property that identifies some vertex's label. Defaults to "label".


labelStrokeWidth?

optional labelStrokeWidth: string

Optional stroke width to use for labels. Defaults to "0.25px".


multilineLabels?

optional multilineLabels: boolean

Defaults to true - word wrap shape labels so they fit into their shapes


showLabels?

optional showLabels: boolean

Defaults to false. If true, a label will be written on the shape (using an SVG text element).