Skip to content

Api: Configs

ryusufe edited this page Nov 29, 2025 · 3 revisions

Configs Interface

The Configs interface allows you to customize various behaviors and constraints of the canvas, nodes, and interactions.

    disableZoom?: boolean;
    disableHorizontalPan?: boolean;
    disableVerticalPan?: boolean;
    minZoom?: number;
    maxZoom?: number;

    disableNodeDrag?: boolean;
    disableEdgeDrag?: boolean;
    gridSize?: number;

    minNodeWidth?: number;
    maxNodeWidth?: number;
    minNodeHeight?: number;
    maxNodeHeight?: number;

    defaultNode?: Partial<NodeType>;
    disableNodeAnchors?: boolean;

    disableAnchorConnectionCreation?: boolean;

    disableKeyboardShortcuts?: boolean;

Viewport / Interaction

Property Type Description
disableZoom boolean Disables zooming on the canvas.
disableVerticalPan boolean Disables vertical movement.
disableHorizontalPan boolean Disables horizontal movement.
minZoom number Minimum zoom level allowed.
maxZoom number Maximum zoom level allowed.

Dragging

Property Type Description
disableNodeDrag boolean Prevents nodes from being dragged.
disableEdgeDrag boolean Prevents edges of the node from being used to resize the node
gridSize number Defines the snapping grid size for nodes and movements.

Resizing Nodes

Property Type Description
minNodeWidth number Minimum width allowed for nodes.
maxNodeWidth number Maximum width allowed for nodes.
minNodeHeight number Minimum height allowed for nodes.
maxNodeHeight number Maximum height allowed for nodes.

Node Creation

Property Type Description
defaultNode Partial<NodeType> Default properties for newly created nodes.
disableNodeAnchors boolean Disables the creation of edge anchors.

Connection Creation

Property Type Description
disableAnchorConnectionCreation boolean Disables creating connections from node anchors.

Keyboard

Property Type Description
disableKeyboardShortcuts boolean Disables all keyboard shortcuts for canvas interactions.

Clone this wiki locally