Fluorite
React package

Components

The Workflow component and the WorkflowProvider.

<Workflow>

Renders a workflow as a live shader on its own canvas.

PropTypeDefaultNotes
idstringWorkflow id (required)
className / styleApplied to the wrapper element
play"visible" | "always" | "hover" | false"visible"When the animation loop runs
revalidatenumberoffPoll interval in ms
revalidateOnFocusbooleanfalseRefetch when the window regains focus
dprnumber | [min, max][1, 2]Device-pixel-ratio clamp
maxFpsnumberuncappedThrottle the frame rate
forceWebGLbooleanfalseSkip WebGPU, render on WebGL2
loadingReactNodeShown while fetching/compiling
fallbackReactNodeShown on error / unsupported device
clientWorkflowClientshared defaultOverride the API endpoint/auth per element
onReady(info) => void{ animated, backend }
onError(error: WorkflowError) => voidSwitch on error.code
onStateChange(state: WorkflowState) => voidObserve the state machine
throwOnErrorbooleanfalseRethrow to an error boundary

Styling hooks

The wrapper element exposes data attributes for pure-CSS styling:

  • data-stateidle, fetching, compiling, ready, paused, error
  • data-backendwebgpu or webgl
  • data-animated — whether the graph is time-varying

<WorkflowProvider>

Zero config works out of the box via a shared default client. To point all embeds in a subtree at a custom origin or key, wrap with a provider:

import { WorkflowProvider } from "@fluorite/react";

<WorkflowProvider config={{ baseUrl: "https://your-host", apiKey: "pk_…" }}>
  {children}
</WorkflowProvider>;
PropTypeNotes
configClientConfig{ baseUrl?, apiKey?, fetch?, cache?, ttlMs? }
clientWorkflowClientA pre-built client; takes precedence over config

baseUrl also reads NEXT_PUBLIC_FLUORITE_BASE_URL when present. apiKey is reserved (ignored by v1 servers) and is a publishable, read-only key.

On this page