Skip to main content

ShapeComponentProps

Extends​

  • DOMAttributes<HTMLDivElement>

Properties​

data​

data: ObjectData

Backing data for the vertex. Required. This is passed in as a prop to a component used to render a node/group, so you can pass it straight through from the parent to this component.


font?​

optional font: FontSpec

Optional font size/style.


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 containing each vertex's label. Defaults to label.


labelStrokeWidth​

labelStrokeWidth: string

Stroke width to use on the text element rendering a label. Defaults to "0.25px".


showLabels?​

optional showLabels: boolean

Whether or not to show labels on each shape. Defaults to false.