<n8n-demo>

Workflow preview web component

API

<n8n-demo>

Attributes

NameDescriptionTypeDefault
workflowWorkflow json to load.string'{}'
frameWhether to add frame around canvas with code and copy buttonstring'false'
srcURL for n8n instance to load workflow.string'https://n8n-preview-service.internal.n8n.cloud/workflows/demo'
collapseformobileWhether to collapse on mobile, so that scrolling on mobile is easier.string'true'
clicktointeractAdd button before users can interact with canvas. Makes scrolling through page easier without getting bugged down.string'false'
hidecanvaserrorsHide node errors on the canvasstring'false'
disableinteractivityDisable interactivity entirely. This will prevent the user from interacting with the workflow.string'false'
themeWhether to force a theme on n8n. Accepts 'light' and 'dark'undefined

Properties

NameAttributeDescriptionTypeDefault
workflowworkflowWorkflow json to load.string'{}'
frameframeWhether to add frame around canvas with code and copy buttonstring'false'
srcsrcURL for n8n instance to load workflow.string'https://n8n-preview-service.internal.n8n.cloud/workflows/demo'
collapseformobilecollapseformobileWhether to collapse on mobile, so that scrolling on mobile is easier.string'true'
clicktointeractclicktointeractAdd button before users can interact with canvas. Makes scrolling through page easier without getting bugged down.string'false'
hidecanvaserrorshidecanvaserrorsHide node errors on the canvasstring'false'
disableinteractivitydisableinteractivityDisable interactivity entirely. This will prevent the user from interacting with the workflow.string'false'
themethemeWhether to force a theme on n8n. Accepts 'light' and 'dark'undefined
showCodebooleanfalse
showPreviewbooleantrue
fullscreenbooleanfalse
insideIframebooleanfalse
copyTextstring'Copy'
isMobileViewbooleanfalse
errorbooleanfalse
interactivebooleantrue
scrollXnumber0
scrollYnumber0
receiveMessage
onDocumentScroll

Methods

NameParametersDescriptionReturn
loadWorkflow
toggleCode
onMouseEnter
onMouseLeave
onOverlayClick
copyClipboard
toggleView
renderIframe