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.

#nodeId
string
#position?
"top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right"
"bottom-right"
#variant?
"handle" | "line"
"handle"
#keepAspectRatio?
boolean
false
#minWidth?
number
10
#maxWidth?
number
Number.MAX_SAFE_INTEGER
#minHeight?
number
10
#maxHeight?
number
Number.MAX_SAFE_INTEGER
#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
#onResize?
(event: D3.DragEvent, params: ResizeParams & { direction: number[]; }) => void
#onResizeEnd?
(event: D3.DragEvent, params: ResizeParams) => void