Dependencies and bundle footprint
react-submit-flow has zero additional runtime dependencies. React is the required peer dependency; React DOM is declared as an optional peer. The package does not pull in a dialog framework, toast system, form library, or styling runtime.
| Package entry | What it includes | Use it when |
| -------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------- |
| react-submit-flow | Typed action hook, provider, form/buttons, built-in dialogs, notifications | You want the ready-to-use UI and shared feedback host |
| react-submit-flow/headless | The action hook and its execution types | You render all controls and feedback yourself |
| react-submit-flow/styles.css | Optional default theme styles | You want the library's default colors and transitions |
| react-submit-flow/themes/forest.css | Optional forest tokens | You want the forest preset |
| react-submit-flow/themes/high-contrast.css | Optional high-contrast tokens | You want the high-contrast preset |
The default dialog uses the browser's native <dialog> element, and the notification host is part of this package. Theme CSS is never imported automatically. The small inline layout styles keep the built-in UI usable when you omit the stylesheet.
Runtime peers and build tools
The published package declares no dependencies. React is a peer in the supported ^18.2.0 and ^19.0.0 ranges; React DOM is listed as an optional peer. Vite, TypeScript, and ESLint are development tools and are not installed as runtime dependencies of your application.
Install React as your app already requires it, then add the package:
pnpm add react-submit-flow
If the application does not already provide React, install the peers too:
pnpm add react react-dom react-submit-flow
Choosing the entry point
Use the root entry for the provider UI:
import { SubmitFlowProvider, useSubmitFlow } from "react-submit-flow";
Use the headless entry when you do not need the built-in host:
import { useSubmitFlow } from "react-submit-flow/headless";
The headless entry avoids loading the provider and dialog UI. It still requires React because it is a React hook. If an action asks for confirmation, supply an adapter or use the root entry under a provider.
Check an installation
In a consuming app, inspect the installed dependency tree with:
npm ls react-submit-flow react react-dom
That command shows the app's existing React peers separately from the library. For a production bundle budget, measure the built app with the import path and CSS imports you actually use; build-tool output alone is not the same as a consumer's final bundle.
The project builds an ESM package with declaration files and optional CSS files. Its package allowlist publishes dist, README.md, and LICENSE; website code and build tooling stay out of the package.