Skip to main content
Pass any subset of GraphTheme to the theme prop. The value is deep-merged with DEFAULT_THEME, so you only override what you care about.

Theme reference

The three knobs that most affect “nodes feel cramped at high zoom” are chargeStrength (push apart harder), boundaryStrength (let the layout breathe further from origin), and node.radius (raise the collision floor). Reasonable ranges: chargeStrength between -30 and -500, boundaryStrength between 0.01 and 0.3.

CSS variables

The package only styles the container and the optional zoom indicator — everything inside the canvas is painted from the theme. Override on .cg-root. The zoom indicator picks up cg-zoom-label--{position} modifier classes — override any of them in your own CSS to retarget placement.