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/rapidkitUsage
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.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| form | Accepts the useFormHandlers or useFormMutation result that drives values, errors, and submission. |
| isSubmitting | Drives the disabled fieldset and submit loading state during async work. |
| serverError | Renders a form-level error banner when the server returns a non-field error. |
| successMessage | Renders a form-level success banner after a successful submit. |
| disableOnSubmit | Wraps children in a disabled fieldset while submitting; defaults to true. |
| resetOnSuccess | Calls form.resetForm() after a successful submit so the form returns to its initial state. |
| errorBanner and successBanner | Override 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.