Installation
Install submitly, its peer dependencies and a Standard Schema library.
Install the packages
npm i submitly react-hook-formThen add the schema library you want to validate with. Any library that implements Standard Schema works:
npm i zodsubmitly bundles its own Standard Schema resolver for react-hook-form, so there is no resolver package to install.
Requirements
| Dependency | Range | Notes |
|---|---|---|
react | >=18.2 | Peer dependency. |
react-hook-form | ^7.55 | Peer dependency. |
next | >=15 | Optional peer dependency, only needed for submitly/next and submitly/next/server. |
| Schema library | Zod 3.24+ or 4, Valibot 1, ArkType 2, or any other Standard Schema implementation | submitly has no dependency on a specific library. |
| TypeScript | >=5.4 | For consumers who use the types. |
The package is ESM-only. Its client entry points ship with a "use client" directive, so they can be imported from
a Next.js Server Component tree (for example, a layout importing NextCrudProvider).
Entry points
| Import | Contents | Runs on |
|---|---|---|
submitly | CrudProvider, useCrudForm, useCrudAction, useControllableDialog, the dialog lock helpers. Also re-exports everything in submitly/core | Client |
submitly/core | The ActionResult contract and its pure helpers (isActionResult, defaultNormalize, defaultMapError, issuesToErrors, getDotPath, validate) and all shared types. No "use client", no React | Client or server |
submitly/next | NextCrudProvider, isNextInterrupt | Client |
submitly/next/server | runAction, createRunAction | Server only |
submitly/next/server imports server-only, so bundling it into client code fails the build instead of leaking
server code. Import the pure helpers from submitly/core in Server Components and server actions: the main submitly
entry is a client module, so its functions cannot be called there. See the API reference for every export.