The useFlow(<flowId>) hook makes it easy to build headless components or manipulate the state of a Flow for an existing component.
It exports a single field, flow, which contains the current state of the Flow, as well as a set of methods to manipulate the Flow.
View the Flow class docs to see the available fields and methods.
The useFlow hook is especially useful if you want to build a highly custom experience with your UI and/or components. You can find some example of how to build custom Flows in our Custom Components guide.
import { useFlow } from "@frigade/react";function MyComponent() { // Replace "myFlowId" with the ID of your Flow const { flow } = useFlow("myFlowId"); return ( <div> <h1>{flow.title}</h1> <p>{flow.subtitle}</p> <p>Currently on step {flow.getCurrentStep().id}</p> <button onClick={flow.next}>Next</button> <button onClick={flow.back}>Previous</button> <button onClick={flow.reset}>Reset</button> </div> );}
Make sure to call any Frigade hook within the context of <Frigade.Provider />
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Frigade Engage","colors":{"primary":"#0170F8","light":"#17A9F9","dark":"#1257BB"},"logo":{"light":"https://mintcdn.com/frigade-docs/vb0YqHQGpTytLgI7/logo/logo.svg?fit=max\u0026auto=format\u0026n=vb0YqHQGpTytLgI7\u0026q=85\u0026s=bb32bda7ce2b46dde51fc35a3998cba6","dark":"https://mintcdn.com/frigade-docs/vb0YqHQGpTytLgI7/logo/logo.svg?fit=max\u0026auto=format\u0026n=vb0YqHQGpTytLgI7\u0026q=85\u0026s=bb32bda7ce2b46dde51fc35a3998cba6"},"favicon":"https://mintcdn.com/frigade-docs/7j7O5wbAiLBomVEP/favicon.svg?fit=max\u0026auto=format\u0026n=7j7O5wbAiLBomVEP\u0026q=85\u0026s=335a4700968aa9af1b838c533976c561","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.frigade.com"}},"background":{"color":{"dark":"#020417"}},"navbar":{"links":[{"href":"https://frigade.com","label":"Website"}],"primary":{"type":"button","label":"Get Started","href":"https://app.frigade.com/"}},"footer":{"socials":{"twitter":"https://twitter.com/FrigadeHQ","github":"https://github.com/FrigadeHQ","linkedin":"https://www.linkedin.com/company/frigade","website":"https://frigade.com/"}},"styling":{"codeblocks":"system","latex":false},"integrations":{"ga4":{"measurementId":"G-WL6B5EKN4K"},"gtm":{"tagId":"G-WL6B5EKN4K"},"koala":{"publicApiKey":"pk_211a1bb6ecee2b11dbe259ec95f3f88a66f1"},"posthog":{"apiKey":"phc_V9yoG0UsQv5NJo5d1kXlgSoftbP9wfVbj7cUIKCzgZ","apiHost":"https://api2.frigade.com"}},"navigation":{"global":{"anchors":[{"anchor":"Frigade AI","icon":"sparkle","href":"https://frigade.ai"},{"anchor":"Coding Agent Skill","icon":"terminal","href":"https://github.com/FrigadeHQ/frigade-engage-skill"},{"anchor":"React SDK Demo","icon":"laptop","href":"https://demo.frigade.com"},{"anchor":"Figma UI Kit","icon":"pen-nib","href":"https://www.figma.com/community/file/1311771082704525565/frigade-product-onboarding-ui-components"},{"anchor":"Onboarding Examples","icon":"graduation-cap","href":"https://productonboarding.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"frigade-docs","hasAudioNarration":false,"actualSubdomain":"frigade-docs","customDomains":["engage-docs.frigade.com"],"gitSource":{"type":"github","owner":"frigadehq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ac9487ffbef690c343cd039","collectionId":"1dfe1e1d-ec79-4567-ba2a-b473939a57e2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac9487ffbef690c343cd039"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ac9487ffbef690c343cd039","clientVersion":"0.0.4005","searchFilterCounts":[{"language":"default","tag":"Platform","count":23},{"language":"default","tag":"Components","count":22},{"language":"default","tag":"Integrations","count":20},{"language":"default","tag":"SDK","count":20},{"language":"default","tag":"API","count":16},{"language":"default","tag":"React SDK","count":11},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Component Guides","count":9},{"language":"default","tag":"Advanced","count":8},{"language":"default","tag":"Flows","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"hr{margin-bottom:1.5rem!important}"}],"page":{"pagePath":"sdk/hooks/flow","slug":"/sdk/hooks/flow","pageMetadata":{"title":"useFlow","sidebarTitle":"useFlow","description":null,"href":"/sdk/hooks/flow"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`useFlow(\u003cflowId>)`}),` hook makes it easy to build headless components or manipulate the state of a Flow for an existing component.\nIt exports a single field, `,_jsx(_components.code,{children:`flow`}),`, which contains the current state of the Flow, as well as a set of methods to manipulate the Flow.\n`,_jsx(_components.a,{href:`/sdk/js/flow`,children:`View the Flow class docs`}),` to see the available fields and methods.`]}),`\n`,_jsx(Heading,{level:`2`,id:`about-this-hook`,children:`About this hook`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`useFlow`}),` hook is especially useful if you want to build a highly custom experience with your UI and/or components. You can find some example of how to build custom Flows in our `,_jsx(_components.a,{href:`/guides/custom`,children:`Custom Components guide`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-use-cases`,children:`Example use cases:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Building a custom onboarding progress widget for your sidebar navigation`}),`\n`,_jsx(_components.li,{children:`Building a custom Kanban-style onboarding experience`}),`\n`,_jsx(_components.li,{children:`Building a highly custom onboarding checklist interface`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-usage`,children:`Example usage:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useFlow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@frigade/react\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` MyComponent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Replace \"myFlowId\" with the ID of your Flow`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useFlow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"myFlowId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtitle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Currently on step `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getCurrentStep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`next`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Next`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`back`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Previous`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reset`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Reset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[`Make sure to call any Frigade hook within the context of `,_jsx(_components.code,{children:`\u003cFrigade.Provider />`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"useFlow","sidebarTitle":"useFlow","description":null,"href":"/sdk/hooks/flow"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"About this hook","slug":"about-this-hook","depth":2,"children":[{"title":"Example use cases:","slug":"example-use-cases","depth":3,"children":[]},{"title":"Example usage:","slug":"example-usage","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/frigade-docs/5031d828fe48622e/scripts/generate-docs.js","/_mintlify/custom/frigade-docs/982f777a274e3879/scripts/extract-docs.js","/_mintlify/custom/frigade-docs/317a2b3031091a10/scripts/combine-docs-to-one.js"],"subdomain":"frigade-docs","siteName":"Frigade Engage","title":"useFlow - Frigade Engage","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T20:03:20.866Z","originalFileLocation":"sdk/hooks/flow.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Frigade Engage\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"useFlow - Frigade Engage\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Frigade Engage\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://engage-docs.frigade.com/sdk/hooks/flow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://frigade-docs.mintlify.app/_mintlify/api/og/v2?division=Hooks\u0026amp;title=useFlow\u0026amp;theme=31ee5e393e9bba621192f5e7\u0026amp;signature=dfc84e02ee52939999af6b05169c162c7d2ed130bd93fcb31f02234a6853abde\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"useFlow - Frigade Engage\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://frigade-docs.mintlify.app/_mintlify/api/og/v2?division=Hooks\u0026amp;title=useFlow\u0026amp;theme=31ee5e393e9bba621192f5e7\u0026amp;signature=dfc84e02ee52939999af6b05169c162c7d2ed130bd93fcb31f02234a6853abde\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/frigade-docs/DJl2tMra70dsLuwC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Frigade Engage\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0170F8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://engage-docs.frigade.com/sdk/hooks/flow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/hooks/flow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://engage-docs.frigade.com/#organization\",\"name\":\"Frigade Engage\",\"url\":\"https://engage-docs.frigade.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/frigade-docs/vb0YqHQGpTytLgI7/logo/logo.svg?fit=max\u0026auto=format\u0026n=vb0YqHQGpTytLgI7\u0026q=85\u0026s=bb32bda7ce2b46dde51fc35a3998cba6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://engage-docs.frigade.com#website\",\"name\":\"Frigade Engage\",\"url\":\"https://engage-docs.frigade.com\",\"publisher\":{\"@id\":\"https://engage-docs.frigade.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://engage-docs.frigade.com/sdk/hooks/flow#webpage\",\"url\":\"https://engage-docs.frigade.com/sdk/hooks/flow\",\"name\":\"useFlow\",\"dateModified\":\"2026-10-09T20:03:20.866Z\",\"isPartOf\":{\"@id\":\"https://engage-docs.frigade.com#website\"},\"breadcrumb\":{\"@id\":\"https://engage-docs.frigade.com/sdk/hooks/flow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://engage-docs.frigade.com/sdk/hooks/flow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"React SDK\",\"item\":\"https://engage-docs.frigade.com/sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"useFlow\",\"item\":\"https://engage-docs.frigade.com/sdk/hooks/flow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://engage-docs.frigade.com/sdk/hooks/flow#article\",\"headline\":\"useFlow\",\"name\":\"useFlow\",\"url\":\"https://engage-docs.frigade.com/sdk/hooks/flow\",\"mainEntityOfPage\":{\"@id\":\"https://engage-docs.frigade.com/sdk/hooks/flow#webpage\"},\"dateModified\":\"2026-10-09T20:03:20.866Z\",\"publisher\":{\"@id\":\"https://engage-docs.frigade.com/#organization\"},\"isPartOf\":{\"@id\":\"https://engage-docs.frigade.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Frigade Engage\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Frigade Engage","nav":{"global":{"anchors":[{"anchor":"Frigade AI","icon":"sparkle","href":"https://frigade.ai"},{"anchor":"Coding Agent Skill","icon":"terminal","href":"https://github.com/FrigadeHQ/frigade-engage-skill"},{"anchor":"React SDK Demo","icon":"laptop","href":"https://demo.frigade.com"},{"anchor":"Figma UI Kit","icon":"pen-nib","href":"https://www.figma.com/community/file/1311771082704525565/frigade-product-onboarding-ui-components"},{"anchor":"Onboarding Examples","icon":"graduation-cap","href":"https://productonboarding.com"}]},"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/overview"}]},{"tab":"Components","pages":[{"title":"Components","href":"/component/overview"}]},{"tab":"SDK","groups":[{"group":"React SDK","pages":[{"title":"React SDK Overview","sidebarTitle":"Overview","href":"/sdk/overview"},{"title":"React SDK Quickstart","sidebarTitle":"Quickstart","href":"/sdk/quickstart"},{"group":"Styling","pages":[{"title":"Theming","href":"/sdk/styling/theming"},{"title":"CSS Overrides","description":null,"href":"/sdk/styling/css-overrides"}]},{"group":"Hooks","pages":[{"title":"useFlow","sidebarTitle":"useFlow","href":"/sdk/hooks/flow"},{"title":"useUser","sidebarTitle":"useUser","description":null,"href":"/sdk/hooks/user"},{"title":"useGroup","sidebarTitle":"useGroup","href":"/sdk/hooks/group"},{"title":"useFrigade","sidebarTitle":"useFrigade","href":"/sdk/hooks/frigade"}]},{"title":"Provider","href":"/sdk/provider"},{"title":"Navigation","href":"/sdk/navigation"},{"title":"Common Issues and Solutions","sidebarTitle":"Common Issues","href":"/sdk/common-issues"}]},{"group":"JavaScript SDK","pages":[{"title":"JS Quickstart","href":"/sdk/js/quickstart"},{"group":"Definitions","pages":[{"title":"Frigade JS Type Definition","sidebarTitle":"Frigade","href":"/sdk/js/frigade"},{"title":"Flow JS Type Definition","sidebarTitle":"Flow","href":"/sdk/js/flow"},{"title":"Step JS Type Definition","sidebarTitle":"Step","href":"/sdk/js/step"}]}]},{"group":"Advanced","pages":[{"title":"Automated Testing","sidebarTitle":"Automated Testing","href":"/sdk/advanced/testing"},{"title":"Dynamically Completing a Step","href":"/sdk/advanced/completing-a-step"},{"title":"Reverse Proxy and Custom Domains","sidebarTitle":"Reverse Proxy","href":"/sdk/advanced/reverse-proxy"},{"title":"Merging a guest session with a authenticated user","sidebarTitle":"Merging a Guest with User","href":"/sdk/advanced/linking-guest-users"},{"title":"V1 SDK Guide","sidebarTitle":"Upgrading from V1","href":"/sdk/advanced/v1"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/authorization"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/announcements"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]}]},"title":"useFlow - Frigade Engage","buildId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","deploymentId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","dynamics":[],"chunks":[]}