Official libraries

### React

Embed the Element in React with the FilecheckIntake component, gate submit on canProceed, and capture the jobId.

filecheck-react

wraps the Element in an idiomatic React component: props map to Element options, events become callback props, and the element lifecycle (create, subscribe, mount, update, teardown) is handled for you. Requires React 18 or newer; every entry point carries

'use client'

, so it works in the Next.js App Router without configuration.

npm

install

filecheck-react

filecheck-js

### Navigate to header: Quickstart Quickstart

import

\{

loadFilecheck

\}

from

'filecheck-js'

;

import

\{

FilecheckProvider

,

FilecheckIntake

\}

from

'filecheck-react'

;

import

\{

useState

\}

from

'react'

;

const

filecheckPromise

=

loadFilecheck

(

'pk\_…'

);

function

Checkout

() \{

const

\[

canProceed

,

setCanProceed

\]

=

useState

(

false

);

const

\[

jobId

,

setJobId

\]

=

useState

(

''

);

return

(

&lt;

FilecheckProvider

filecheck

=

\{

filecheckPromise

\}

&gt;

&lt;

FilecheckIntake

workflowId

=

"wf\_…"

onStatus

=

\{

(

s

)

=&gt;

\{

setCanProceed

(

s

.

canProceed

);

// authoritative — never re-derive

setJobId

(

s

.

jobId

??

''

);

\}

\}

/&gt;

&lt;

form

method

=

"post"

action

=

"/checkout"

&gt;

&lt;

input

type

=

"hidden"

name

=

"fc\_job\_id"

value

=

\{

jobId

\}

readOnly

/&gt;

&lt;

button

type

=

"submit"

disabled

=

\{

\!

canProceed

\}

&gt;

Continue

&lt;/

button

&gt;

&lt;/

form

&gt;

&lt;/

FilecheckProvider

&gt;

);

\}

Then

verify the

jobId

server-side

before fulfilling — client-side gating alone can be bypassed.

### Navigate to header: &lt;FilecheckIntake /&gt; props &lt;FilecheckIntake /&gt; props

| Prop | Kind | Behavior on change |
| --- | --- | --- |
| workflowId , ui , locale | Mutable | Applied via element.update() — no remount. Inline object literals are compared by value. |
| connector | Mutable | Applied via element.setConnector() — no remount. |
| jobId , presentation , connectorId , preview , workflow | Identity | Changing one recreates the element (instances are single-use). |
| onReady , onStatus , onFacts , onUi , onError , onProof , onFileSelect , onDownload , onDestroy , onConnectorApply | Callbacks | Safe to pass inline — changing a callback never re-subscribes or recreates. |
| id , className , style | Slot | Applied to the wrapper &lt;div&gt; . Width only; the widget self-sizes. |

The component is safe under React 18 StrictMode — the dev double-mount produces exactly one iframe.

### Navigate to header: Imperative access Imperative access

Expose the element instance through a ref when you need

focus()

,

blur()

, or

respondToProof()

:

const

ref

=

useRef

&lt;

FilecheckIntakeRef

&gt;(

null

);

&lt;

FilecheckIntake

ref

=

\{

ref

\}

workflowId

=

"wf\_…"

/&gt;

// ref.current?.focus(); ref.current?.respondToProof(true);

// ref.current?.element — the raw element instance

useFilecheck()

returns the resolved factory (or

null

while the CDN script loads) for anything the component does not cover — for example creating a

report

element yourself.

All

filecheck-js

types are re-exported, so one import site covers both packages.

Suggest edits

Raise issue

[verify the jobId server-side](https://filecheck.io/docs/server/verify-jobs)

[Suggest edits](https://github.com/sterlyai/mintlify-docs/edit/main/integrations/react.mdx)

[Raise issue](https://github.com/sterlyai/mintlify-docs/issues/new?title=Issue%20on%20docs&body=Path:%20/integrations/react)

[Navigate to header: Quickstart](https://filecheck.io/docs/integrations/react#quickstart)

[Navigate to header: &lt;FilecheckIntake /&gt; props](https://filecheck.io/docs/integrations/react#%3Cfilecheckintake-/%3E-props)

[Navigate to header: Imperative access](https://filecheck.io/docs/integrations/react#imperative-access)