<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 | ShouldResizeCallback to determine if node should resize. | |
onResizeStart | OnResizeStartCallback called when resizing starts. | |
onResize | OnResizeCallback called when resizing. | |
onResizeEnd | OnResizeEndCallback called when resizing ends. | |
position | ControlPositionPosition of the control. | |
variant | ResizeControlVariantVariant of the control. | "handle" |
resizeDirection | ResizeControlDirectionThe 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