UI component

Form

Form is a presentational shell that binds a useFormHandlers or useFormMutation result to a native <form>, provides field-binding context to descendant FormField components, and exposes submitting / server error / success slots.

Installation

Install the package in your app.

pnpm add @rapidset/rapidkit

Usage

Import components from the package entrypoint.

import { Form, FormField, FormSubmit } from '@rapidset/rapidkit';

Examples

Preview the component and copy the snippet.

Sign in to RapidKit

Welcome back. Use your work email to continue.

Remember me on this device

API Reference

Commonly used props at a glance.

PropDescription
formAccepts the useFormHandlers or useFormMutation result that drives values, errors, and submission.
isSubmittingDrives the disabled fieldset and submit loading state during async work.
serverErrorRenders a form-level error banner when the server returns a non-field error.
successMessageRenders a form-level success banner after a successful submit.
disableOnSubmitWraps children in a disabled fieldset while submitting; defaults to true.
resetOnSuccessCalls form.resetForm() after a successful submit so the form returns to its initial state.
errorBanner and successBannerOverride the default banner rendering with custom nodes or render functions.

Accessibility

Form renders a native <form> element and ties the submitting state to a real fieldset, so disabled fields stay focusable for screen readers and submit triggers ride the native submit lifecycle.

Integration notes

Keep your data fetching outside the form by passing in a useFormHandlers result for local submission or a useFormMutation result for RTK Query integration.