<NodeResizeControl />
The <NodeResizeControl /> component renders a single resize control, so you can
place and style resize handles individually — as opposed to
<NodeResizer />, which renders the full
set at once.
<!-- ResizableNode.vue -->
<script setup lang="ts">
import { Handle, NodeResizeControl, Position, type NodeProps } from '@xyflow/vue';
defineProps<NodeProps>();
</script>
<template>
<NodeResizeControl position="bottom-right" :min-width="100" :min-height="30" />
<Handle type="target" :position="Position.Left" />
<div>{{ data.label }}</div>
<Handle type="source" :position="Position.Right" />
</template>Props
The type for props of <NodeResizeControl /> component is exported as ResizeControlProps.
Notes
- Use the
positionprop to choose which corner or edge the control sits on, andvariantto switch between a handle and a line control. - Like
<NodeResizer />, it emitsresize-start,resize, andresize-end.