Skip to main content
ShapeComponentProps
Props for a ShapeComponent
NameTypeDescription
ctxJsxWrapperProps<T>Context for the vertex, as passed in by the SurfaceComponent.
font?FontSpecOptional font size/style to use for this shape.
labelColor?stringColor for the label. Defaults to #000000.
labelFillRatio?numberFor multiline labels, the proportion of the width of the shape that the longest line can take up.
labelPosition?LabelPositionDefaults to "center". Use "top" or "bottom" to set the label above or below the shape.
labelProperty?stringThe name of the property that identifies some vertex's label. Defaults to "label".
labelStrokeWidth?stringOptional stroke width to use for labels. Defaults to "0.25px".
multilineLabels?booleanDefaults to true - word wrap shape labels so they fit into their shapes
showLabels?booleanDefaults to false. If true, a label will be written on the shape (using an SVG text element).