Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

LabelAttachmentContent

LabelAttachmentContent = { canvas: HTMLCanvasElement; type: "canvas"; } | { svg: string | SVGElement; type: "svg"; } | { css?: string; height?: number; html: string | HTMLElement; type: "html"; width?: number; }

Defined in: packages/sigma/src/primitives/types.ts:140

The content returned by a label attachment renderer.

  • “canvas”: an already-rendered HTMLCanvasElement (dimensions from canvas.width/height)
  • “svg”: an SVG string or element (dimensions parsed from width/height attributes or viewBox)
  • “html”: an HTML string or element with explicit dimensions (rendered via SVG foreignObject)