UI component
FormSubmit
FormSubmit is a Button wrapper bound to Form context. It defaults to type=submit, reads isSubmitting from context, and applies loading + disabled automatically. Every other Button prop passes through unchanged.
Installation
Install the package in your app.
pnpm add @rapidset/rapidkitUsage
Import components from the package entrypoint.
import { FormSubmit } from '@rapidset/rapidkit';Examples
Preview the component and copy the snippet.
Submit button with context state
FormSubmit reads isSubmitting from <Form> and toggles loading + disabled automatically.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| label | Sets the button text; same as the underlying Button label prop. |
| loadingWhenSubmitting | Suppresses the built-in spinner when set to false; useful if you render your own. |
| disableWhenSubmitting | Keeps the button clickable while submitting when set to false. |
| variant | Forwards the Button variant (Default, Outline, Ghost, etc.) to control visual treatment. |
| leftIcon and rightIcon | Forwards icon slots to the underlying Button so the submit button can carry leading or trailing icons. |
Accessibility
FormSubmit renders a native button with type=submit and forwards aria-disabled / aria-busy state from the Button primitive so screen readers announce the submitting state correctly.
Optional access rules
Optional access rules from the host application can hide the submit button or keep it visible-but-disabled depending on the resolved policy.