submitly

Installation

Install submitly, its peer dependencies and a Standard Schema library.

Install the packages

npm i submitly react-hook-form

Then add the schema library you want to validate with. Any library that implements Standard Schema works:

npm i zod

submitly bundles its own Standard Schema resolver for react-hook-form, so there is no resolver package to install.

Requirements

DependencyRangeNotes
react>=18.2Peer dependency.
react-hook-form^7.55Peer dependency.
next>=15Optional peer dependency, only needed for submitly/next and submitly/next/server.
Schema libraryZod 3.24+ or 4, Valibot 1, ArkType 2, or any other Standard Schema implementationsubmitly has no dependency on a specific library.
TypeScript>=5.4For 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

ImportContentsRuns on
submitlyCrudProvider, useCrudForm, useCrudAction, useControllableDialog, the dialog lock helpers. Also re-exports everything in submitly/coreClient
submitly/coreThe ActionResult contract and its pure helpers (isActionResult, defaultNormalize, defaultMapError, issuesToErrors, getDotPath, validate) and all shared types. No "use client", no ReactClient or server
submitly/nextNextCrudProvider, isNextInterruptClient
submitly/next/serverrunAction, createRunActionServer 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.

Next steps

Edit on GitHub

On this page