<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 | string Id of the node it is resizing. | |
color | string Color of the resize handle. | |
minWidth | number Minimum width of node. | 10 |
minHeight | number Minimum height of node. | 10 |
maxWidth | number Maximum width of node. | Number.MAX_VALUE |
maxHeight | number Maximum height of node. | Number.MAX_VALUE |
keepAspectRatio | boolean Keep aspect ratio when resizing. | false |
shouldResize | ShouldResize Callback to determine if node should resize. | |
onResizeStart | OnResizeStart Callback called when resizing starts. | |
onResize | OnResize Callback called when resizing. | |
onResizeEnd | OnResizeEnd Callback called when resizing ends. | |
position | ControlPosition Position of the control. | |
variant | ResizeControlVariant Variant of the control. | "handle" |
className | string | |
style | CSSProperties | |
children | ReactNode |
Last updated on