Skip to main content
Version: 4.3

LinkStyle

Visual styling for a link, the visible line plus its invisible pointer hit-area wrapper. Hand it to linkStyle (or a link record's style field); empty-string values fall back to the CSS variables in theme.css.

Properties​

className?​

optional className?: string;

Extra CSS class added to the visible line.

Default​

''

color?​

optional color?: string;

Stroke color of the visible line. Any CSS color, including CSS variables. Empty inherits the theme default.

Default​

''

dasharray?​

optional dasharray?: string;

Dash pattern in SVG stroke-dasharray syntax, e.g. '5,5' for a dashed line.

Default​

''

linecap?​

optional linecap?: LiteralUnion<"butt" | "round" | "square">;

Stroke line cap of the line ends.

Default​

''

linejoin?​

optional linejoin?: LiteralUnion<"bevel" | "round" | "miter">;

Stroke line join at the line's corners.

Default​

''

sourceMarker?​

optional sourceMarker?: LinkMarker;

Marker at the source end: a LinkMarkerName, a LinkMarkerRecord, or 'none' for no marker.

Default​

'none'

targetMarker?​

optional targetMarker?: LinkMarker;

Marker at the target end: a LinkMarkerName, a LinkMarkerRecord, or 'none' for no marker.

Default​

'none'

width?​

optional width?: string | number;

Stroke width of the visible line, a number (px) or CSS length string. Empty inherits the theme default.

Default​

''

wrapperClassName?​

optional wrapperClassName?: string;

Extra CSS class added to the wrapper.

Default​

''

wrapperColor?​

optional wrapperColor?: string;

Stroke color of the wrapper. Usually transparent, set it to make the hit area visible while debugging.

Default​

'transparent'

wrapperWidth?​

optional wrapperWidth?: number;

Stroke width, in px, of the transparent wrapper that widens the pointer hit area.

Default​

10