LabelOptions
Defined in: packages/sigma/src/rendering/nodes/types.ts:395
Options for configuring labels rendered by the LabelProgram.
Per-item label position is set via the style system (labelPosition style),
not here — the primitives scope only configures program-wide defaults that
styles can override.
Properties
Section titled “Properties”color?
Section titled “color?”
optionalcolor?:string
Defined in: packages/sigma/src/rendering/nodes/types.ts:411
Default label color (CSS color string). Default: “#000000”
optionalfont?:LabelFontOptions
Defined in: packages/sigma/src/rendering/nodes/types.ts:405
Font configuration for labels.
margin?
Section titled “margin?”
optionalmargin?:number
Defined in: packages/sigma/src/rendering/nodes/types.ts:400
Default margin between node edge and label in pixels. Default: 5
zoomToLabelSizeRatioFunction?
Section titled “zoomToLabelSizeRatioFunction?”
optionalzoomToLabelSizeRatioFunction?: (ratio) =>number
Defined in: packages/sigma/src/rendering/nodes/types.ts:419
Function that maps camera zoom ratio to a label size ratio. The label size is divided by this value, so returning values < 1 makes labels bigger. Default: () => 1 (labels stay at fixed pixel size regardless of zoom). Example: Math.sqrt makes labels scale with zoom like nodes do.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number