Skip to content

WorkflowBuilderActions

WorkflowBuilderActions = object

Imperative action surface for a custom layout that omits <WorkflowBuilder.TopBar />. Mirrors every command the built-in app bar exposes (save, modal openers, read-only and theme toggles) and adds programmatic layout-direction control, which the bar itself does not offer.

Stable across renders while the active integration and the mounted React Flow instance are stable (layout actions close over the fit-view callback, which is keyed on that instance).

openExport: () => void

Open the export-diagram modal.

void


openImport: () => void

Open the import-diagram modal.

void


openSettings: () => void

Open the built-in workflow settings modal.

void


save: () => Promise<DidSaveStatus>

Persist the current diagram through the active integration strategy.

Promise<DidSaveStatus>


setLayoutDirection: (direction) => void

Set the diagram layout direction ('RIGHT''DOWN'). Idempotent: setting the same direction twice is a no-op. Position reflow is only offered on toggleLayoutDirection, where it is unambiguous.

LayoutDirection

void


setReadOnly: (value) => void

Set read-only mode explicitly.

boolean

void


setTheme: (theme) => void

Set the editor theme explicitly.

Theme

void


toggleDarkMode: () => void

Flip the editor theme between 'light' and 'dark'.

void


toggleLayoutDirection: (options?) => void

Flip the diagram layout direction. Pass options.flipPositions to also reflow node coordinates and/or options.fitView to re-fit the view afterwards.

LayoutChangeOptions

void


toggleReadOnly: () => void

Flip read-only mode.

void