學習概念

外掛組件

React Flow 帶有一些額外的外掛組件。在本指南中,我們將向您展示如何使用它們。我們在這裡使用之前的範例程式碼

MiniMap

如果您的流程變得較大,您可能想要快速獲得概觀。為此,我們建立了MiniMap 組件。您可以輕鬆地將其作為子元素加入您的流程

export default function App() {
  const data: string = "world"

  return <h1>Hello {data}</h1>
}

唯讀

控制項

React Flow 帶有一個可自訂的控制列,您可以透過匯入 Controls 組件來使用它

export default function App() {
  const data: string = "world"

  return <h1>Hello {data}</h1>
}

唯讀

背景

如果您想要顯示圖案背景,可以使用Background 組件

export default function App() {
  const data: string = "world"

  return <h1>Hello {data}</h1>
}

唯讀

面板

一個在 React Flow 視窗上方顯示內容的輔助組件。Panel 組件

export default function App() {
  const data: string = "world"

  return <h1>Hello {data}</h1>
}

唯讀