Skip to Content
ReferenceComponents

<NodeResizeControl />

Source on GitHub

To create your own resizing UI, you can use the NodeResizeControl component where you can pass children (such as icons).

Props

For TypeScript users, the props type for the <NodeResizeControl /> component is exported as ResizeControlProps.

NameTypeDefault
nodeIdstring

Id of the node it is resizing.

colorstring

Color of the resize handle.

minWidthnumber

Minimum width of node.

10
minHeightnumber

Minimum height of node.

10
maxWidthnumber

Maximum width of node.

Number.MAX_VALUE
maxHeightnumber

Maximum height of node.

Number.MAX_VALUE
keepAspectRatioboolean

Keep aspect ratio when resizing.

false
shouldResizeShouldResize

Callback to determine if node should resize.

onResizeStartOnResizeStart

Callback called when resizing starts.

onResizeOnResize

Callback called when resizing.

onResizeEndOnResizeEnd

Callback called when resizing ends.

positionControlPosition

Position of the control.

variantResizeControlVariant

Variant of the control.

"handle"
classNamestring
styleCSSProperties
childrenReactNode
Last updated on