<NodeResizeControl />
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.
| Name | Type | Default | 
|---|---|---|
nodeId | stringId of the node it is resizing.  | |
color | stringColor of the resize handle.  | |
minWidth | numberMinimum width of node.  | 10 | 
minHeight | numberMinimum height of node.  | 10 | 
maxWidth | numberMaximum width of node.  | Number.MAX_VALUE | 
maxHeight | numberMaximum height of node.  | Number.MAX_VALUE | 
keepAspectRatio | booleanKeep aspect ratio when resizing.  | false | 
shouldResize | (event: ResizeDragEvent, params: ResizeParamsWithDirection) => booleanCallback to determine if node should resize.  | |
autoScale | booleanScale the controls with the zoom level.  | true | 
onResizeStart | OnResizeStartCallback called when resizing starts.  | |
onResize | OnResizeCallback called when resizing.  | |
onResizeEnd | OnResizeEndCallback called when resizing ends.  | |
position | ControlLinePosition | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Position of the control.  | |
variant | ResizeControlVariantVariant of the control.  | "handle" | 
resizeDirection | 'horizontal' | 'vertical'The direction the user can resize the node. If not provided, the user can resize in any direction.  | |
className | string | |
style | CSSProperties | |
children | ReactNode | 
Last updated on