logo

X6

  • Tutorials
  • API
  • Examples
  • Q&A
  • Change Log
  • XFlow
  • Productsantv logo arrow
  • 2.x
  • start
    • Introduction
    • Quick Start
  • component
    • XFlowGraph Canvas
    • Background
    • Grid
    • Clipboard Copy and Paste
    • History Undo Redo
    • Minimap
    • Snapline Alignment Lines
    • Transform
    • Control Controller
  • Hook
    • useGraphInstance
    • useGraphStore
    • useGraphEvent
    • useDnd
    • useClipboard
    • useExport
    • useHistory
    • useKeyboard
  • Store

Control Controller

Previous
Transform
Next
useGraphInstance

Resource

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-Interactive solution
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

Canvas Common Operations Controller

Basic Usage

Note

The <Control /> component can only be used properly within the <XFlow /> component.

The Control component provides shortcuts for common operations on the canvas.

<XFlow>
...
<Control
items={['zoomOut', 'zoomTo', 'zoomIn', 'zoomToFit', 'zoomToOrigin']}
/>
</XFlow>

API

Control

Parameter NameDescriptionTypeDefault Value
itemsItems displayed by the controllerControlAction[]-
directionType of display for the controllerhorizontal | verticalhorizontal
placementDirection of the controller's Tooltip displaytop | right | bottom | lefttop

Type of ControlAction

Parameter NameTypeDefault Value
ControlAction("zoomTo" | "zoomToFit" | "zoomIn" | "zoomOut" | "zoomToOrigin")[]-
Control 配置
Tooltip
Options
zoomOut
zoomTo
zoomIn
zoomToFit
zoomToOrigin