<NodeResizeControl />
Source on GitHub (opens in a new tab)
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 | string |
|
# position? | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" |
|
# variant? | "handle" | "line" |
|
# keepAspectRatio? | boolean |
|
# minWidth? | number |
|
# maxWidth? | number |
|
# minHeight? | number |
|
# maxHeight? | number |
|
# color? | string |
|
# style? | string |
|
# class? | string |
|
# children? | React.ReactNode |
|
# shouldResize? | (event: D3.DragEvent, params: ResizeParams & { direction: number[] }) => boolean |
|
# onResizeStart? | (event: D3.DragEvent, params: ResizeParams) => void |
|
# shouldResize? | (event: D3.DragEvent, params: ResizeParams & { direction: number[] }) => boolean |
|
# onResizeEnd? | (event: D3.DragEvent, params: ResizeParams) => void |
|